Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type ContextAwareHttpClient ¶
type ContextAwareHttpClient struct {
// contains filtered or unexported fields
}
func NewContextAwareHttpClient ¶
func NewContextAwareHttpClient(doer HttpDoer) *ContextAwareHttpClient
type DetailedErrorResponse ¶
type DetailedErrorResponse struct { Errors []map[string]interface{} `json:"errors"` Type string `json:"type"` Title string `json:"title"` Status int `json:"status"` Instance string `json:"instance"` Detail string `json:"detail"` }
func (*DetailedErrorResponse) Error ¶
func (e *DetailedErrorResponse) Error() string
type ErrorChecker ¶
type ErrorChecker struct{}
func (*ErrorChecker) CheckForErrors ¶
func (c *ErrorChecker) CheckForErrors(response *http.Response) error
type ResponseChecker ¶
type RetryingHttpClient ¶
type RetryingHttpClient struct {
// contains filtered or unexported fields
}
RetryingHttpClient is an HttpDoer decorator that retries HTTP requests for any response with HTTP status 500+, or any network error.
func NewRetryingHttpClient ¶
func NewRetryingHttpClient(wrappedClient HttpDoer, retryAttempts int, multiplier float64) *RetryingHttpClient
type UserAgentHttpClient ¶
type UserAgentHttpClient struct {
// contains filtered or unexported fields
}
UserAgentHttpClient is an HttpDoer decorator that sets the "User-Agent" HTTP header on requests.
func NewUserAgentHttpClient ¶
func NewUserAgentHttpClient(wrapper HttpDoer, userAgent string) *UserAgentHttpClient
Source Files ¶
Click to show internal directories.
Click to hide internal directories.