Documentation
¶
Index ¶
- Variables
- type Client
- func (c *Client) Delete(ctx context.Context, url string, headers Headers) (rp *Response, err error)
- func (c *Client) DeleteTimeout(timeout time.Duration, url string, headers Headers) (rp *Response, err error)
- func (c *Client) Do(req *http.Request) (rp *Response, err error)
- func (c *Client) Get(ctx context.Context, url string, headers Headers) (rp *Response, err error)
- func (c *Client) GetTimeout(timeout time.Duration, url string, headers Headers) (rp *Response, err error)
- func (c *Client) Head(ctx context.Context, url string, headers Headers) (rp *Response, err error)
- func (c *Client) HeadTimeout(timeout time.Duration, url string, headers Headers) (rp *Response, err error)
- func (c *Client) Options(ctx context.Context, url string, headers Headers) (rp *Response, err error)
- func (c *Client) OptionsTimeout(timeout time.Duration, url string, headers Headers) (rp *Response, err error)
- func (c *Client) Post(ctx context.Context, url string, body []byte, headers Headers) (rp *Response, err error)
- func (c *Client) PostTimeout(timeout time.Duration, url string, body []byte, headers Headers) (rp *Response, err error)
- func (c *Client) Put(ctx context.Context, url string, body []byte, headers Headers) (rp *Response, err error)
- func (c *Client) PutTimeout(timeout time.Duration, url string, body []byte, headers Headers) (rp *Response, err error)
- func (c *Client) Request(ctx context.Context, method, url string, body []byte, headers Headers) (rp *Response, err error)
- func (c *Client) RequestTimeout(timeout time.Duration, method, url string, body []byte, headers Headers) (rp *Response, err error)
- type Headers
- type Options
- type Response
Constants ¶
This section is empty.
Variables ¶
View Source
var ( DefaultOptions = func() Options { return Options{ MaxIdleConns: 8, MaxIdleConnsPerHost: 2, MaxConnsPerHost: 8, TimeoutSec: 30, IdleConnTimeoutSec: 60, WriteBufferSize: 4 << 10, ReadBufferSize: 4 << 10, } } )
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
func (*Client) DeleteTimeout ¶
func (*Client) GetTimeout ¶
func (*Client) HeadTimeout ¶
func (*Client) OptionsTimeout ¶
func (*Client) PostTimeout ¶
func (*Client) PutTimeout ¶
type Options ¶
type Options struct {
DisableKeepAlives bool `json:"disableKeepAlives" yaml:"disableKeepAlives"`
DisableCompression bool `json:"disableCompression" yaml:"disableCompression"`
MaxIdleConns int `json:"maxIdleConns" yaml:"maxIdleConns"`
MaxIdleConnsPerHost int `json:"maxIdleConnsPerHost" yaml:"maxIdleConnsPerHost"`
MaxConnsPerHost int `json:"maxConnsPerHost" yaml:"maxConnsPerHost"`
TimeoutSec int `json:"timeoutSec" yaml:"timeoutSec"`
IdleConnTimeoutSec int `json:"idleConnTimeoutSec" yaml:"idleConnTimeoutSec"`
WriteBufferSize int `json:"writeBufferSize" yaml:"writeBufferSize"`
ReadBufferSize int `json:"readBufferSize" yaml:"readBufferSize"`
}
func (*Options) IdleConnTimeout ¶
type Response ¶
type Response struct {
// contains filtered or unexported fields
}
func (*Response) UnmarshalJson ¶
Click to show internal directories.
Click to hide internal directories.