Documentation ¶
Index ¶
- Variables
- type Client
- func (c *Client) Accept(contentTypes string)
- func (c *Client) Body(data interface{})
- func (c *Client) CacheControl(directive string)
- func (c *Client) Client(cl *http.Client)
- func (c *Client) ContentType(ct string)
- func (c *Client) Cookie(name, value string) error
- func (c *Client) Delete(remoteURL string, data interface{}) error
- func (c *Client) GET(remoteURL string, params map[string]string) error
- func (c *Client) GetContentLength() int64
- func (c *Client) GetContentType() string
- func (c *Client) GetResponseData(data interface{}) error
- func (c *Client) Head(remoteURL string, params map[string]string) error
- func (c *Client) Headers(h map[string]string) error
- func (c *Client) POST(remoteURL string, data interface{}) error
- func (c *Client) POSTFile(remoteURL string, otherFields map[string]string, files map[string][]string) error
- func (c *Client) PUT(remoteURL string, data interface{}) error
- func (c *Client) Params(params map[string]string)
- func (c *Client) Set(name, value string)
- func (c *Client) ToFile(filePath string) error
- func (c *Client) ToFileAt(filePath string, offset int64) error
- func (c *Client) Transport(rt http.RoundTripper)
- func (c *Client) UserAgent(s string)
Constants ¶
This section is empty.
Variables ¶
View Source
var DefaultClient = &http.Client{ Transport: &http.Transport{ TLSClientConfig: &tls.Config{InsecureSkipVerify: true}, }, Timeout: 30 * time.Second, }
View Source
var DefaultHTTP3Client = &http.Client{ Transport: &http3.RoundTripper{ TLSClientConfig: &tls.Config{InsecureSkipVerify: true}, }, Timeout: 30 * time.Second, }
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
func (*Client) CacheControl ¶
CacheControl sets the client-side Cache-Control directive for a request.
func (*Client) ContentType ¶
ContentType sets the Content-Type header on a request.
Click to show internal directories.
Click to hide internal directories.