Files
fasthttp/examples/host_client/README.md
T
Sergey Ponomarev 632e222c2a Client examples (#1208)
* examples/host_client

* examples/client

* examples/client/client.go refine imports

Co-authored-by: Erik Dubbelboer <erik@dubbelboer.com>

* examples/host_client/hostclient.go refine imports

Co-authored-by: Erik Dubbelboer <erik@dubbelboer.com>

Co-authored-by: Erik Dubbelboer <erik@dubbelboer.com>
2022-02-09 11:09:36 +01:00

14 lines
419 B
Markdown

# Host Client Example
The HostClient is useful when calling an API from a single host.
The example also shows how to use URI.
You may create the parsed URI once and reuse it in many requests.
The URI has a username and password for Basic Auth but you may also set other parts i.e. `SetPath()`, `SetQueryString()`.
# How to build and run
Start a web server on localhost:8080 then execute:
make
./host_client