Versions in this module Expand all Collapse all v2 v2.0.1 Apr 3, 2023 v2.0.0 Apr 3, 2023 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(ctx context.Context, url string, data ...interface{}) (*Response, error) + func (c *Client) ConnectBytes(ctx context.Context, url string, data ...interface{}) []byte + func (c *Client) ConnectContent(ctx context.Context, url string, data ...interface{}) string + func (c *Client) ConnectVar(ctx context.Context, 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) Delete(ctx context.Context, url string, data ...interface{}) (*Response, error) + func (c *Client) DeleteBytes(ctx context.Context, url string, data ...interface{}) []byte + func (c *Client) DeleteContent(ctx context.Context, url string, data ...interface{}) string + func (c *Client) DeleteVar(ctx context.Context, url string, data ...interface{}) *gvar.Var + func (c *Client) DoRequest(ctx context.Context, method, url string, data ...interface{}) (resp *Response, err error) + func (c *Client) DoRequestObj(ctx context.Context, req, res interface{}) error + func (c *Client) Get(ctx context.Context, url string, data ...interface{}) (*Response, error) + func (c *Client) GetBytes(ctx context.Context, url string, data ...interface{}) []byte + func (c *Client) GetContent(ctx context.Context, url string, data ...interface{}) string + func (c *Client) GetVar(ctx context.Context, url string, data ...interface{}) *gvar.Var + func (c *Client) Head(ctx context.Context, url string, data ...interface{}) (*Response, error) + func (c *Client) HeadBytes(ctx context.Context, url string, data ...interface{}) []byte + func (c *Client) HeadContent(ctx context.Context, url string, data ...interface{}) string + func (c *Client) HeadVar(ctx context.Context, 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(ctx context.Context, url string, data ...interface{}) (*Response, error) + func (c *Client) OptionsBytes(ctx context.Context, url string, data ...interface{}) []byte + func (c *Client) OptionsContent(ctx context.Context, url string, data ...interface{}) string + func (c *Client) OptionsVar(ctx context.Context, url string, data ...interface{}) *gvar.Var + func (c *Client) Patch(ctx context.Context, url string, data ...interface{}) (*Response, error) + func (c *Client) PatchBytes(ctx context.Context, url string, data ...interface{}) []byte + func (c *Client) PatchContent(ctx context.Context, url string, data ...interface{}) string + func (c *Client) PatchVar(ctx context.Context, url string, data ...interface{}) *gvar.Var + func (c *Client) Post(ctx context.Context, url string, data ...interface{}) (*Response, error) + func (c *Client) PostBytes(ctx context.Context, url string, data ...interface{}) []byte + func (c *Client) PostContent(ctx context.Context, url string, data ...interface{}) string + func (c *Client) PostForm(url string, data url.Values) (resp *Response, err error) + func (c *Client) PostVar(ctx context.Context, url string, data ...interface{}) *gvar.Var + func (c *Client) Prefix(prefix string) *Client + func (c *Client) Proxy(proxyURL string) *Client + func (c *Client) Put(ctx context.Context, url string, data ...interface{}) (*Response, error) + func (c *Client) PutBytes(ctx context.Context, url string, data ...interface{}) []byte + func (c *Client) PutContent(ctx context.Context, url string, data ...interface{}) string + func (c *Client) PutVar(ctx context.Context, url string, data ...interface{}) *gvar.Var + func (c *Client) RedirectLimit(redirectLimit int) *Client + func (c *Client) RequestBytes(ctx context.Context, method string, url string, data ...interface{}) []byte + func (c *Client) RequestContent(ctx context.Context, method string, url string, data ...interface{}) string + func (c *Client) RequestVar(ctx context.Context, 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) SetBuilder(builder gsel.Builder) + 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) SetDiscovery(discovery gsvc.Discovery) + 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(ctx context.Context, url string, data ...interface{}) (*Response, error) + func (c *Client) TraceBytes(ctx context.Context, url string, data ...interface{}) []byte + func (c *Client) TraceContent(ctx context.Context, url string, data ...interface{}) string + func (c *Client) TraceVar(ctx context.Context, 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 (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 + func (r *Response) SetBodyContent(content []byte) + type WebSocketClient struct + func NewWebSocket() *WebSocketClient