Documentation ¶
Overview ¶
Package httpx implements HTTP helper types and functions.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ToJSON ¶
func ToJSON(v any) requests.ResponseHandler
ToJSON is like requests.ToJSON but verifies that only a single value is decoded.
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
Client is an HTTP client with context helpers.
This type is similar to ctxhttp's functions, but does not copy requests unnecessarily.
func (*Client) AsOAuth2Client ¶
AsOAuth2Client registers the client as the client to use in the OAuth2 library. The context returned by this function should be used when calling OAuth2 related functions.
type Option ¶
type Option func(*Client)
func WithBrowserUserAgent ¶
func WithBrowserUserAgent() Option
func WithRetryOnServerError ¶
func WithRetryOnServerError() Option
Click to show internal directories.
Click to hide internal directories.