Versions in this module Expand all Collapse all v0 v0.1.1 Oct 3, 2016 Changes in this version + var DefaultHTTPClient = NewHTTPClient(&HTTPClientOptions{ ... }) + var DefaultKeyHeader = "X-Key" + func NewHTTPClient(options *HTTPClientOptions) *http.Client + type Client struct + Endpoint string + ErrorRegistry map[int]error + HTTPClient *http.Client + Headers map[string]string + Key string + KeyHeader string + UserAgent string + func (c Client) JSON(method, path string, query url.Values, body io.Reader, response interface{}) (err error) + func (c Client) Request(method, path string, query url.Values, body io.Reader, accept []string) (resp *http.Response, err error) + func (c Client) Stream(method, path string, query url.Values, body io.Reader, accept []string) (data io.ReadCloser, contentType string, err error) + type Error struct + func (e *Error) Error() string + type HTTPClientOptions struct + KeepAlive time.Duration + RetrySleepBase time.Duration + RetrySleepMax time.Duration + RetryTimeMax time.Duration + TLSHandshakeTimeout time.Duration + TLSSkipVerify bool + Timeout time.Duration + func (o *HTTPClientOptions) UnmarshalJSON(data []byte) error + func (o HTTPClientOptions) MarshalJSON() ([]byte, error) + type HTTPError struct + Code int + Status string + func (e *HTTPError) Error() string