Documentation ¶
Index ¶
- func DefaultClient(allProxy string, certPool *x509.CertPool) *http.Client
- func InsecureClient() *http.Client
- func MakeReplayable(r *http.Request) (io.ReadCloser, error)
- func New(allProxy string, insecureSkipVerify, externalClient bool, ...) *http.Client
- func NewAttemptRetryStrategy(maxAttempts int, delay time.Duration, retryable boshretry.Retryable) boshretry.RetryStrategy
- func SOCKS5DialContextFuncFromAllProxy(allProxy string, socks5Proxy boshhttp.ProxyDialer) boshhttp.DialContextFunc
- func WithClientSessionCache(capacity int) tlsconfig.TLSOption
- func WithInsecureSkipVerify(insecureSkipVerify bool) tlsconfig.TLSOption
- type AdjustableClient
- type AdjustedClient
- type Adjustment
- type AuthRequestAdjustment
- type Client
- type DefaultHTTPClient
- func (c *DefaultHTTPClient) Delete(endpoint string) (*http.Response, error)
- func (c *DefaultHTTPClient) DeleteCustomized(endpoint string, f func(*http.Request)) (*http.Response, error)
- func (c *DefaultHTTPClient) Get(endpoint string) (*http.Response, error)
- func (c *DefaultHTTPClient) GetCustomized(endpoint string, f func(*http.Request)) (*http.Response, error)
- func (c *DefaultHTTPClient) Post(endpoint string, payload []byte) (*http.Response, error)
- func (c *DefaultHTTPClient) PostCustomized(endpoint string, payload []byte, f func(*http.Request)) (*http.Response, error)
- func (c *DefaultHTTPClient) Put(endpoint string, payload []byte) (*http.Response, error)
- func (c *DefaultHTTPClient) PutCustomized(endpoint string, payload []byte, f func(*http.Request)) (*http.Response, error)
- type Opts
- type RedirectFunc
- type RequestRetryable
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func InsecureClient ¶
func MakeReplayable ¶
func MakeReplayable(r *http.Request) (io.ReadCloser, error)
func NewAttemptRetryStrategy ¶
func SOCKS5DialContextFuncFromAllProxy ¶
func SOCKS5DialContextFuncFromAllProxy(allProxy string, socks5Proxy boshhttp.ProxyDialer) boshhttp.DialContextFunc
func WithClientSessionCache ¶
func WithInsecureSkipVerify ¶
Types ¶
type AdjustableClient ¶
type AdjustableClient struct {
// contains filtered or unexported fields
}
func NewAdjustableClient ¶
func NewAdjustableClient(client AdjustedClient, adjustment Adjustment) AdjustableClient
type AdjustedClient ¶
type Adjustment ¶
type AuthRequestAdjustment ¶
type AuthRequestAdjustment struct {
// contains filtered or unexported fields
}
func NewAuthRequestAdjustment ¶
func NewAuthRequestAdjustment( authFunc func(bool) (string, error), client, clientSecret string, ) AuthRequestAdjustment
func (AuthRequestAdjustment) Adjust ¶
func (a AuthRequestAdjustment) Adjust(req *http.Request, retried bool) error
func (AuthRequestAdjustment) NeedsReadjustment ¶
func (a AuthRequestAdjustment) NeedsReadjustment(resp *http.Response) bool
type Client ¶
type DefaultHTTPClient ¶
type DefaultHTTPClient struct {
// contains filtered or unexported fields
}
func NewHTTPClient ¶
func NewHTTPClient(client Client) *DefaultHTTPClient
func NewHTTPClientOpts ¶
func NewHTTPClientOpts(client Client, opts Opts) *DefaultHTTPClient
func (*DefaultHTTPClient) Delete ¶
func (c *DefaultHTTPClient) Delete(endpoint string) (*http.Response, error)
func (*DefaultHTTPClient) DeleteCustomized ¶
func (*DefaultHTTPClient) Get ¶
func (c *DefaultHTTPClient) Get(endpoint string) (*http.Response, error)
func (*DefaultHTTPClient) GetCustomized ¶
func (*DefaultHTTPClient) PostCustomized ¶
func (*DefaultHTTPClient) PutCustomized ¶
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.