Documentation
¶
Index ¶
- type Client
- func (http *Client) Body(raw string) *Client
- func (http *Client) BodyBytes(raw []byte) *Client
- func (http *Client) BodyJSON(obj interface{}) *Client
- func (http *Client) End() (Response, error)
- func (http *Client) EndStruct(obj interface{}) (Response, error)
- func (http *Client) Header(key string, value string) *Client
- func (http *Client) Headers(headers Headers) *Client
- func (http *Client) Response() Response
- type Headers
- type Response
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
Client ...
func (*Client) EndStruct ¶
EndStruct executes the request, unmarshals the response body into a struct and returns the response.
type Response ¶
type Response struct {
// contains filtered or unexported fields
}
Response represents the HTTP response used in the given client.
func (Response) Bytes ¶
Bytes returns the response body as a byte slice and unzips gzipped content when necessary.
func (Response) StatusCode ¶
StatusCode returns the status code of the response.
Click to show internal directories.
Click to hide internal directories.