Documentation
¶
Overview ¶
Package prefix provides fixed prefixing for HTTP client requests.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Wrap ¶
func Wrap(inner httpclient.HttpClient, pfx interface{}) httpclient.HttpClient
Wrap wraps a HttpClient so that any request URL with undefined scheme/host will use the prefix supplied here. The prefix pfx should be a URL: either *net.URL or string (otherwise it panics).
func WrapWithHost ¶
func WrapWithHost(inner httpclient.HttpClient, pfx interface{}) httpclient.HttpClient
WrapWithHost wraps a HttpClient so that any request URL with undefined scheme/host will use the prefix supplied here. The prefix pfx should be a URL: either *net.URL or string (otherwise it panics).
The Host header is also defined on all requests. See package hostheader.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.