Documentation
¶
Index ¶
- type Client
- type ErrorParser
- type Option
- func WithBasicAuth(user, pass string) Option
- func WithClientCA(ca *x509.CertPool) Option
- func WithErrorParser(p ErrorParser) Option
- func WithHost(h string) Option
- func WithInsecure() Option
- func WithPlainHTTP() Option
- func WithTransport(t http.RoundTripper) Option
- func WithUserAgent(ua string) Option
- type Options
- type RoundTripperFunc
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client interface { Get(ctx context.Context, url string) (*http.Response, error) Post(ctx context.Context, url string, body io.Reader) (*http.Response, error) Put(ctx context.Context, url string, body io.Reader) (*http.Response, error) Delete(ctx context.Context, url string) (*http.Response, error) Options() Options Close() }
type Option ¶
type Option func(*options)
func WithBasicAuth ¶
func WithClientCA ¶
func WithErrorParser ¶
func WithErrorParser(p ErrorParser) Option
func WithInsecure ¶
func WithInsecure() Option
func WithPlainHTTP ¶
func WithPlainHTTP() Option
func WithTransport ¶
func WithTransport(t http.RoundTripper) Option
func WithUserAgent ¶
Click to show internal directories.
Click to hide internal directories.