Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BaseClient ¶
type BaseClient struct {
// contains filtered or unexported fields
}
func NewBaseClient ¶
func NewBaseClient(baseURL string, opts ...Option) *BaseClient
func (*BaseClient) CheckStatus ¶
func (c *BaseClient) CheckStatus(resp *http.Response) error
CheckStatus returns nil for 200 OK responses. For all other status codes, it drains the response body (for TCP connection reuse) and returns an *HTTPError.
type Option ¶ added in v1.0.0
type Option func(*BaseClient)
Option configures a BaseClient.
func WithHeader ¶ added in v1.0.0
WithHeader adds a default header to all requests.
Click to show internal directories.
Click to hide internal directories.