Versions in this module Expand all Collapse all v1 v1.17.0 Sep 16, 2022 Changes in this version + func LoadKeyCrt(crtFile, keyFile string) (*tls.Config, error) + type Client struct + func New() *Client + func (c *Client) BasicAuth(user, pass string) *Client + func (c *Client) Clone() *Client + func (c *Client) Connect(url string, data ...interface{}) (*Response, error) + func (c *Client) ConnectBytes(url string, data ...interface{}) []byte + func (c *Client) ConnectContent(url string, data ...interface{}) string + func (c *Client) ConnectVar(url string, data ...interface{}) *gvar.Var + func (c *Client) ContentJson() *Client + func (c *Client) ContentType(contentType string) *Client + func (c *Client) ContentXml() *Client + func (c *Client) Cookie(m map[string]string) *Client + func (c *Client) Ctx(ctx context.Context) *Client + func (c *Client) Delete(url string, data ...interface{}) (*Response, error) + func (c *Client) DeleteBytes(url string, data ...interface{}) []byte + func (c *Client) DeleteContent(url string, data ...interface{}) string + func (c *Client) DeleteVar(url string, data ...interface{}) *gvar.Var + func (c *Client) DoRequest(method, url string, data ...interface{}) (resp *Response, err error) + func (c *Client) Dump(dump ...bool) *Client + func (c *Client) Get(url string, data ...interface{}) (*Response, error) + func (c *Client) GetBytes(url string, data ...interface{}) []byte + func (c *Client) GetContent(url string, data ...interface{}) string + func (c *Client) GetVar(url string, data ...interface{}) *gvar.Var + func (c *Client) Head(url string, data ...interface{}) (*Response, error) + func (c *Client) HeadBytes(url string, data ...interface{}) []byte + func (c *Client) HeadContent(url string, data ...interface{}) string + func (c *Client) HeadVar(url string, data ...interface{}) *gvar.Var + func (c *Client) Header(m map[string]string) *Client + func (c *Client) HeaderRaw(headers string) *Client + func (c *Client) Next(req *http.Request) (*Response, error) + func (c *Client) Options(url string, data ...interface{}) (*Response, error) + func (c *Client) OptionsBytes(url string, data ...interface{}) []byte + func (c *Client) OptionsContent(url string, data ...interface{}) string + func (c *Client) OptionsVar(url string, data ...interface{}) *gvar.Var + func (c *Client) Patch(url string, data ...interface{}) (*Response, error) + func (c *Client) PatchBytes(url string, data ...interface{}) []byte + func (c *Client) PatchContent(url string, data ...interface{}) string + func (c *Client) PatchVar(url string, data ...interface{}) *gvar.Var + func (c *Client) Post(url string, data ...interface{}) (*Response, error) + func (c *Client) PostBytes(url string, data ...interface{}) []byte + func (c *Client) PostContent(url string, data ...interface{}) string + func (c *Client) PostVar(url string, data ...interface{}) *gvar.Var + func (c *Client) Prefix(prefix string) *Client + func (c *Client) Proxy(proxyURL string) *Client + func (c *Client) Put(url string, data ...interface{}) (*Response, error) + func (c *Client) PutBytes(url string, data ...interface{}) []byte + func (c *Client) PutContent(url string, data ...interface{}) string + func (c *Client) PutVar(url string, data ...interface{}) *gvar.Var + func (c *Client) RedirectLimit(redirectLimit int) *Client + func (c *Client) RequestBytes(method string, url string, data ...interface{}) []byte + func (c *Client) RequestContent(method string, url string, data ...interface{}) string + func (c *Client) RequestVar(method string, url string, data ...interface{}) *gvar.Var + func (c *Client) Retry(retryCount int, retryInterval time.Duration) *Client + func (c *Client) SetAgent(agent string) *Client + func (c *Client) SetBasicAuth(user, pass string) *Client + func (c *Client) SetBrowserMode(enabled bool) *Client + func (c *Client) SetContentType(contentType string) *Client + func (c *Client) SetCookie(key, value string) *Client + func (c *Client) SetCookieMap(m map[string]string) *Client + func (c *Client) SetCtx(ctx context.Context) *Client + func (c *Client) SetDump(dump bool) *Client + func (c *Client) SetHeader(key, value string) *Client + func (c *Client) SetHeaderMap(m map[string]string) *Client + func (c *Client) SetHeaderRaw(headers string) *Client + func (c *Client) SetPrefix(prefix string) *Client + func (c *Client) SetProxy(proxyURL string) + func (c *Client) SetRedirectLimit(redirectLimit int) *Client + func (c *Client) SetRetry(retryCount int, retryInterval time.Duration) *Client + func (c *Client) SetTLSConfig(tlsConfig *tls.Config) error + func (c *Client) SetTLSKeyCrt(crtFile, keyFile string) error + func (c *Client) SetTimeout(t time.Duration) *Client + func (c *Client) Timeout(t time.Duration) *Client + func (c *Client) Trace(url string, data ...interface{}) (*Response, error) + func (c *Client) TraceBytes(url string, data ...interface{}) []byte + func (c *Client) TraceContent(url string, data ...interface{}) string + func (c *Client) TraceVar(url string, data ...interface{}) *gvar.Var + func (c *Client) Use(handlers ...HandlerFunc) *Client + type HandlerFunc = func(c *Client, r *http.Request) (*Response, error) + type Response struct + func MiddlewareTracing(c *Client, r *http.Request) (response *Response, err error) + func (r *Response) Close() error + func (r *Response) GetCookie(key string) string + func (r *Response) GetCookieMap() map[string]string + func (r *Response) Raw() string + func (r *Response) RawDump() + func (r *Response) RawRequest() string + func (r *Response) RawResponse() string + func (r *Response) ReadAll() []byte + func (r *Response) ReadAllString() string