Documentation ¶
Index ¶
- func BodyJSON(v any) *bodyJSON
- type Client
- func (r *Client) Delete(ctx context.Context, uri string, params ...any) (*Resp, error)
- func (r *Client) Do(ctx context.Context, method, uri string, params ...any) (*Resp, error)
- func (r *Client) EnableHTTPBalance(cacheExpire time.Duration) *Client
- func (r *Client) Get(ctx context.Context, uri string, params ...any) (*Resp, error)
- func (r *Client) Patch(ctx context.Context, uri string, params ...any) (*Resp, error)
- func (r *Client) Post(ctx context.Context, uri string, params ...any) (*Resp, error)
- func (r *Client) Put(ctx context.Context, uri string, params ...any) (*Resp, error)
- func (r *Client) SetBaseClient(client HTTPClient) *Client
- func (r *Client) SetBaseHeaders(headers Headers) *Client
- func (r *Client) SetBaseURL(baseURL string) *Client
- func (r *Client) SetBaseURLs(baseURLs []string) *Client
- func (r *Client) SetBasicAuth(username, password string) *Client
- func (r *Client) SetDialTimeout(timeout time.Duration) *Client
- func (r *Client) SetMaxIdleConns(maxIdleConns int) *Client
- func (r *Client) SetTimeout(timeout time.Duration) *Client
- type DNSBalancer
- type DialContext
- type GetBody
- type HTTPBalancer
- type HTTPClient
- type Headers
- type MapForm
- type MapJSON
- type MapMultipartForm
- type Query
- type Resp
- func Delete(ctx context.Context, uri string, params ...interface{}) (*Resp, error)
- func Get(ctx context.Context, uri string, params ...interface{}) (*Resp, error)
- func Patch(ctx context.Context, uri string, params ...interface{}) (*Resp, error)
- func Post(ctx context.Context, uri string, params ...interface{}) (*Resp, error)
- func Put(ctx context.Context, uri string, params ...interface{}) (*Resp, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
func (*Client) EnableHTTPBalance ¶ added in v1.9.1
func (*Client) SetBaseClient ¶
func (r *Client) SetBaseClient(client HTTPClient) *Client
func (*Client) SetBaseHeaders ¶
func (*Client) SetBaseURL ¶
func (*Client) SetBaseURLs ¶ added in v1.8.0
func (*Client) SetBasicAuth ¶
func (*Client) SetDialTimeout ¶ added in v1.9.7
func (*Client) SetMaxIdleConns ¶ added in v1.9.8
type DNSBalancer ¶ added in v1.9.1
type DNSBalancer struct {
// contains filtered or unexported fields
}
func (*DNSBalancer) DialContext ¶ added in v1.9.1
type DialContext ¶ added in v1.9.0
type GetBody ¶ added in v1.8.2
type GetBody func() (io.ReadCloser, error)
type HTTPBalancer ¶ added in v1.9.1
type HTTPBalancer struct {
// contains filtered or unexported fields
}
type MapMultipartForm ¶ added in v1.10.0
Click to show internal directories.
Click to hide internal directories.