Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client interface {
common.Initializable
SetHeaders(headers ...common.Pair[string, string])
SetCookies(cookies ...*http.Cookie)
NewRequest(ctx context.Context, request *Request, opts ...RequestOption) (*http.Request, error)
Do(req *http.Request) (*http.Response, error)
Send(ctx context.Context, request *Request, opts ...RequestOption) (*http.Response, error)
}
type Option ¶
type Option func(*client)
func WithLogger ¶
func WithTLS ¶ added in v0.9.0
func WithTLS(cert certutil.CertBundle, rootCAs ...*x509.Certificate) Option
WithTLS presents cert, when not nil, and verifies the server against rootCAs, the system's when none.
func WithTimeout ¶
type Request ¶
type RequestOption ¶
type RequestOption func(*Request)
func WithRequestCookies ¶
func WithRequestCookies(cookies ...*http.Cookie) RequestOption
func WithRequestEncoding ¶ added in v0.4.0
func WithRequestEncoding(encoding api.Encoding) RequestOption
func WithRequestHeaders ¶
func WithRequestHeaders(headers ...common.Pair[string, string]) RequestOption
Click to show internal directories.
Click to hide internal directories.