Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var NewHTTPClient = defaultHTTPClientFactory
NewHTTPClient is a factory of HTTPClient
Functions ¶
func UnmarshalResponse ¶
UnmarshalResponse takes an http Response and returns: - its body, deserialized if content-type appropriate - metadata such as headers and status code
Types ¶
type HTTPClient ¶ added in v1.3.0
HTTPClient is an interface for decoupling http.Client
type HTTPClientConfig ¶ added in v1.3.0
type HTTPClientConfig struct { Timeout time.Duration FollowRedirect bool Transport http.RoundTripper }
HTTPClientConfig is a set of options used to initialize a HTTPClient
type UnmarshalFunc ¶
UnmarshalFunc is a type of function capable of taking the body of an http response and deserialize it into a target interface{}
Click to show internal directories.
Click to hide internal directories.