Documentation ¶
Index ¶
- func ClientFromContext(ctx context.Context) *http.Client
- func ContextWithClient(ctx context.Context, c *http.Client) context.Context
- func ContextWithDefaultHttpTransport(ctx context.Context, t *http.Transport) context.Context
- func DefaultHttpTransportFromContext(ctx context.Context) *http.Transport
- func GetShortConnClient(timeout time.Duration, httpTransports ...HttpTransport) *http.Client
- func GetShortConnClientContext(ctx context.Context, timeout time.Duration, httpTransports ...HttpTransport) *http.Client
- type Client
- type HttpTransport
- type Result
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ContextWithClient ¶ added in v1.9.2
func ContextWithDefaultHttpTransport ¶ added in v1.17.12
func DefaultHttpTransportFromContext ¶ added in v1.17.12
func GetShortConnClient ¶
func GetShortConnClient(timeout time.Duration, httpTransports ...HttpTransport) *http.Client
Deprecated use GetShortConnClientContext instead
func GetShortConnClientContext ¶ added in v1.17.12
Types ¶
type Client ¶
type Client struct { Protocol string Host string Port uint16 Timeout time.Duration RequestTransformerMgr *httptransport.RequestTransformerMgr HttpTransports []HttpTransport NewError func(resp *http.Response) error }
func (*Client) SetDefaults ¶
func (c *Client) SetDefaults()
type HttpTransport ¶
type HttpTransport func(rt http.RoundTripper) http.RoundTripper
type Result ¶
type Result struct { TransformerMgr transformers.TransformerMgr Response *http.Response NewError func(resp *http.Response) error Err error }
func (*Result) StatusCode ¶ added in v1.14.8
Click to show internal directories.
Click to hide internal directories.