Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type HTTPDoError ¶
type HTTPDoError struct {
// contains filtered or unexported fields
}
HTTPDoError uses with `(http.Client).Do` error.
func NewHTTPDoError ¶
func NewHTTPDoError(req *http.Request, err error) *HTTPDoError
NewHTTPDoError creates a new HTTPDoError.
func (HTTPDoError) Error ¶
func (h HTTPDoError) Error() string
func (HTTPDoError) Unwrap ¶
func (h HTTPDoError) Unwrap() error
type ReadResponseError ¶
type ReadResponseError struct { StatusCode int // contains filtered or unexported fields }
ReadResponseError use with `io.ReadAll` when reading response body.
func NewReadResponseError ¶
func NewReadResponseError(req *http.Request, statusCode int, err error) *ReadResponseError
NewReadResponseError creates a new ReadResponseError.
func (ReadResponseError) Error ¶
func (r ReadResponseError) Error() string
func (ReadResponseError) Unwrap ¶
func (r ReadResponseError) Unwrap() error
type UnexpectedStatusCodeError ¶
type UnexpectedStatusCodeError struct { StatusCode int Body []byte // contains filtered or unexported fields }
UnexpectedStatusCodeError use when the status of the response is unexpected but there is no API error type.
func NewUnexpectedResponseStatusCodeError ¶
func NewUnexpectedResponseStatusCodeError(req *http.Request, resp *http.Response) *UnexpectedStatusCodeError
func NewUnexpectedStatusCodeError ¶
func NewUnexpectedStatusCodeError(req *http.Request, statusCode int, body []byte) *UnexpectedStatusCodeError
NewUnexpectedStatusCodeError creates a new UnexpectedStatusCodeError.
func (UnexpectedStatusCodeError) Error ¶
func (u UnexpectedStatusCodeError) Error() string
type UnmarshalError ¶
UnmarshalError uses with `json.Unmarshal` or `xml.Unmarshal` when reading response body.
func NewUnmarshalError ¶
NewUnmarshalError creates a new UnmarshalError.
func (UnmarshalError) Error ¶
func (u UnmarshalError) Error() string
func (UnmarshalError) Unwrap ¶
func (u UnmarshalError) Unwrap() error
Click to show internal directories.
Click to hide internal directories.