Documentation
¶
Index ¶
Constants ¶
const ( ETag = "ETag" ContentType = "Content-Type" )
Standard S3 HTTP response constants
Variables ¶
This section is empty.
Functions ¶
func DrainBody ¶
func DrainBody(respBody io.ReadCloser)
DrainBody close non nil response with any response Body. convenient wrapper to drain any remaining data on response body.
Subsequently this allows golang http RoundTripper to re-use the same connection for future requests.
Types ¶
type Client ¶
Client is an HTTP Interface implementation
Define the structure of a http client and define the functions that are actually used
type ClientI ¶
type ClientI interface {
Get(url string) (resp *http.Response, err error)
Post(url, contentType string, body io.Reader) (resp *http.Response, err error)
Do(req *http.Request) (*http.Response, error)
}
ClientI interface with all functions to be implemented by mock when testing, it should include all HttpClient respective api calls that are used within this project.