Documentation
¶
Index ¶
- Variables
- func CreateDefaultClient(certPool *x509.CertPool) *http.Client
- func CreateDefaultClientInsecureSkipVerify() *http.Client
- func CreateExternalDefaultClient(certPool *x509.CertPool) *http.Client
- func CreateKeepAliveDefaultClient(certPool *x509.CertPool) *http.Client
- func MakeReplayable(r *http.Request) (io.ReadCloser, error)
- func NewMutualTLSClient(identity tls.Certificate, caCertPool *x509.CertPool, serverName string) *http.Client
- func ResetDialerContext()
- func WithClientSessionCache(capacity int) tlsconfig.TLSOption
- func WithInsecureSkipVerify(insecureSkipVerify bool) tlsconfig.TLSOption
- type Client
- type DialContextFunc
- type HTTPClient
- func (c *HTTPClient) Delete(endpoint string) (*http.Response, error)
- func (c *HTTPClient) DeleteCustomized(endpoint string, f func(*http.Request)) (*http.Response, error)
- func (c *HTTPClient) Get(endpoint string) (*http.Response, error)
- func (c *HTTPClient) GetCustomized(endpoint string, f func(*http.Request)) (*http.Response, error)
- func (c *HTTPClient) Post(endpoint string, payload []byte) (*http.Response, error)
- func (c *HTTPClient) PostCustomized(endpoint string, payload []byte, f func(*http.Request)) (*http.Response, error)
- func (c *HTTPClient) Put(endpoint string, payload []byte) (*http.Response, error)
- func (c *HTTPClient) PutCustomized(endpoint string, payload []byte, f func(*http.Request)) (*http.Response, error)
- type Opts
- type ProxyDialer
- type RequestRetryable
Constants ¶
This section is empty.
Variables ¶
View Source
var (
DefaultClient = CreateDefaultClientInsecureSkipVerify()
)
Functions ¶
func MakeReplayable ¶
func MakeReplayable(r *http.Request) (io.ReadCloser, error)
func NewMutualTLSClient ¶
func ResetDialerContext ¶ added in v0.0.331
func ResetDialerContext()
func WithClientSessionCache ¶
func WithInsecureSkipVerify ¶
Types ¶
type Client ¶
type DialContextFunc ¶
func SOCKS5DialContextFuncFromEnvironment ¶
func SOCKS5DialContextFuncFromEnvironment(origDialer *net.Dialer, socks5Proxy ProxyDialer) DialContextFunc
func (DialContextFunc) DialContext ¶
type HTTPClient ¶
type HTTPClient struct {
// contains filtered or unexported fields
}
func NewHTTPClient ¶
func NewHTTPClient(client Client, logger boshlog.Logger) *HTTPClient
func NewHTTPClientOpts ¶
func NewHTTPClientOpts(client Client, logger boshlog.Logger, opts Opts) *HTTPClient
func (*HTTPClient) DeleteCustomized ¶
func (*HTTPClient) GetCustomized ¶
func (*HTTPClient) PostCustomized ¶
func (*HTTPClient) PutCustomized ¶
type ProxyDialer ¶
type RequestRetryable ¶
type RequestRetryable struct {
// contains filtered or unexported fields
}
func NewRequestRetryable ¶
func (*RequestRetryable) Attempt ¶
func (r *RequestRetryable) Attempt() (bool, error)
func (*RequestRetryable) Response ¶
func (r *RequestRetryable) Response() *http.Response
Click to show internal directories.
Click to hide internal directories.