Versions in this module Expand all Collapse all v0 v0.1.0 Feb 4, 2026 Changes in this version + const ContentEncoding + const ContentType + const DefaultMaxResponses + const DefaultResponseTTL + const SchemeHTTP + const SchemeHTTPS + const SchemeWS + const SchemeWSS + const URLencoded + var ErrEmptyURL = errors.New("empty URL") + var ErrInvalidURL = errors.New("invalid URL") + var ErrMaxRedirectsExceeded = errors.New("max redirects exceeded") + var ErrMissingHost = errors.New("missing host") + var ErrPayloadNotReplayable = errors.New("payload cannot be replayed: non-seekable reader exceeds buffer limit") + var ErrRedirectMissingLocation = errors.New("redirect location header missing") + func Connect(url string, opts ...*options.Option) (response.Response, error) + func Custom(method string, url string, payload any, opts ...*options.Option) (response.Response, error) + func Delete(url string, opts ...*options.Option) (response.Response, error) + func Get(url string, opts ...*options.Option) (response.Response, error) + func Head(url string, opts ...*options.Option) (response.Response, error) + func MultipartUpload(method, url string, payload map[string]any, opts ...*options.Option) (response.Response, error) + func Options(url string, opts ...*options.Option) (response.Response, error) + func Patch(url string, payload any, opts ...*options.Option) (response.Response, error) + func PatchFile(url string, filename string, opts ...*options.Option) (response.Response, error) + func PatchFormData(url string, payload map[string]string, opts ...*options.Option) (response.Response, error) + func PatchMultipartUpload(url string, payload map[string]interface{}, opts ...*options.Option) (response.Response, error) + func Post(url string, payload any, opts ...*options.Option) (response.Response, error) + func PostFile(url string, filename string, opts ...*options.Option) (response.Response, error) + func PostFormData(url string, payload map[string]string, opts ...*options.Option) (response.Response, error) + func PostMultipartUpload(url string, payload map[string]interface{}, opts ...*options.Option) (response.Response, error) + func Put(url string, payload any, opts ...*options.Option) (response.Response, error) + func PutFile(url string, filename string, opts ...*options.Option) (response.Response, error) + func PutFormData(url string, payload map[string]string, opts ...*options.Option) (response.Response, error) + func PutMultipartUpload(url string, payload map[string]interface{}, opts ...*options.Option) (response.Response, error) + func Trace(url string, opts ...*options.Option) (response.Response, error) + type Client struct + func New(opts ...*options.Option) *Client + func NewCustom(client *http.Client, opts ...*options.Option) *Client + func (c *Client) AddGlobalOptions(opts *options.Option) + func (c *Client) Clear() + func (c *Client) CloneOptions() *options.Option + func (c *Client) Connect(url string, opts ...*options.Option) (response.Response, error) + func (c *Client) Custom(method string, url string, payload any, opts ...*options.Option) (response.Response, error) + func (c *Client) Delete(url string, opts ...*options.Option) (response.Response, error) + func (c *Client) Get(url string, opts ...*options.Option) (response.Response, error) + func (c *Client) GlobalOptions() *options.Option + func (c *Client) Head(url string, opts ...*options.Option) (response.Response, error) + func (c *Client) Options(url string, opts ...*options.Option) (response.Response, error) + func (c *Client) Patch(url string, payload any, opts ...*options.Option) (response.Response, error) + func (c *Client) PatchFile(url string, filename string, opts ...*options.Option) (response.Response, error) + func (c *Client) PatchFormData(url string, payload map[string]string, opts ...*options.Option) (response.Response, error) + func (c *Client) Post(url string, payload any, opts ...*options.Option) (response.Response, error) + func (c *Client) PostFile(url string, filename string, opts ...*options.Option) (response.Response, error) + func (c *Client) PostFormData(url string, payload map[string]string, opts ...*options.Option) (response.Response, error) + func (c *Client) Put(url string, payload any, opts ...*options.Option) (response.Response, error) + func (c *Client) PutFile(url string, filename string, opts ...*options.Option) (response.Response, error) + func (c *Client) PutFormData(url string, payload map[string]string, opts ...*options.Option) (response.Response, error) + func (c *Client) Response(id string) *response.Response + func (c *Client) ResponseCount() int + func (c *Client) Responses() []response.Response + func (c *Client) SetMaxResponses(max int) + func (c *Client) SetResponseTTL(ttl time.Duration) + func (c *Client) Trace(url string, opts ...*options.Option) (response.Response, error) + func (c *Client) UpdateGlobalOptions(opts *options.Option)