Documentation ¶
Index ¶
- Variables
- type Authenticator
- type Client
- func (c *Client) Delete(path string, opts RequestOptions, out interface{}) error
- func (c *Client) Get(path string, opts RequestOptions, out interface{}) error
- func (c *Client) GetStream(path string, opts RequestOptions) (*http.Response, error)
- func (c *Client) HandleRequest(req *http.Request) (*http.Response, error)
- func (c *Client) Head(path string, opts RequestOptions, out *bool) error
- func (c *Client) Options(path string, opts RequestOptions, out interface{}) error
- func (c *Client) Post(path string, opts RequestOptions, out interface{}) error
- func (c *Client) PostStream(path string, opts RequestOptions) (*http.Response, error)
- func (c *Client) Put(path string, opts RequestOptions, out interface{}) error
- func (c *Client) PutStream(path string, opts RequestOptions) (*http.Response, error)
- func (c *Client) Request(method, path string, opts RequestOptions) (*http.Request, error)
- func (c *Client) Websocket(path string, opts RequestOptions) (io.ReadCloser, error)
- func (c *Client) WithContext(ctx context.Context) *Client
- type Files
- type Headers
- type HeadersFunc
- type Params
- type Query
- type RequestOptions
Constants ¶
This section is empty.
Variables ¶
View Source
var DefaultClient = &http.Client{ Transport: &http.Transport{ DialContext: (&net.Dialer{ Timeout: 30 * time.Second, KeepAlive: 10 * time.Second, }).DialContext, MaxIdleConns: 100, IdleConnTimeout: 90 * time.Second, TLSHandshakeTimeout: 10 * time.Second, ExpectContinueTimeout: 1 * time.Second, TLSClientConfig: &tls.Config{ InsecureSkipVerify: true, }, }, }
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct { Authenticator Authenticator Endpoint *url.URL Headers HeadersFunc // contains filtered or unexported fields }
func (*Client) Delete ¶
func (c *Client) Delete(path string, opts RequestOptions, out interface{}) error
func (*Client) HandleRequest ¶
func (*Client) Options ¶
func (c *Client) Options(path string, opts RequestOptions, out interface{}) error
func (*Client) Post ¶
func (c *Client) Post(path string, opts RequestOptions, out interface{}) error
func (*Client) PostStream ¶
func (*Client) Websocket ¶
func (c *Client) Websocket(path string, opts RequestOptions) (io.ReadCloser, error)
type HeadersFunc ¶
type RequestOptions ¶
func MarshalOptions ¶
func MarshalOptions(opts interface{}) (RequestOptions, error)
func (*RequestOptions) Querystring ¶
func (o *RequestOptions) Querystring() (string, error)
Click to show internal directories.
Click to hide internal directories.