Documentation ¶
Index ¶
- Variables
- type Client
- func (h *Client) BaseURL() *url.URL
- func (h *Client) Delete(ctx context.Context, path string, reqOptions RequestOptions) (*HttpResponse, error)
- func (h *Client) Do(ctx context.Context, method, path string, reqOptions RequestOptions) (*HttpResponse, error)
- func (h *Client) Get(ctx context.Context, path string, reqOptions RequestOptions) (*HttpResponse, error)
- func (h *Client) Patch(ctx context.Context, path string, reqOptions RequestOptions) (*HttpResponse, error)
- func (h *Client) Post(ctx context.Context, path string, reqOptions RequestOptions) (*HttpResponse, error)
- func (h *Client) Put(ctx context.Context, path string, reqOptions RequestOptions) (*HttpResponse, error)
- type Config
- type HttpResponse
- type RequestOptions
Constants ¶
This section is empty.
Variables ¶
View Source
var DefaultClient = fasthttp.Client{
MaxConnsPerHost: 10240,
ReadBufferSize: 4 * 1024,
WriteBufferSize: 4 * 1024,
}
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct { Config // contains filtered or unexported fields }
func (*Client) Delete ¶
func (h *Client) Delete(ctx context.Context, path string, reqOptions RequestOptions) (*HttpResponse, error)
func (*Client) Do ¶
func (h *Client) Do(ctx context.Context, method, path string, reqOptions RequestOptions) (*HttpResponse, error)
func (*Client) Get ¶
func (h *Client) Get(ctx context.Context, path string, reqOptions RequestOptions) (*HttpResponse, error)
func (*Client) Patch ¶
func (h *Client) Patch(ctx context.Context, path string, reqOptions RequestOptions) (*HttpResponse, error)
func (*Client) Post ¶
func (h *Client) Post(ctx context.Context, path string, reqOptions RequestOptions) (*HttpResponse, error)
func (*Client) Put ¶
func (h *Client) Put(ctx context.Context, path string, reqOptions RequestOptions) (*HttpResponse, error)
type HttpResponse ¶
func (*HttpResponse) UnmarshalBody ¶
func (r *HttpResponse) UnmarshalBody(out any) error
Click to show internal directories.
Click to hide internal directories.