Documentation ¶
Index ¶
- Variables
- func DrainBody(b io.ReadCloser) (r1, r2 io.ReadCloser, err error)
- func FlattenResponse(request *http.Request, response *http.Response, maxSize int64) (map[string]any, error)
- func IsValidStatusCode(code int) bool
- func ReadResponse(response *http.Response, maxSize int64) ([]byte, error)
- func ValidateStatusCode(request *http.Request, response *http.Response, resErrMsgKey string, ...) error
- type Doer
- type ResponseError
Constants ¶
This section is empty.
Variables ¶
Functions ¶
func DrainBody ¶
func DrainBody(b io.ReadCloser) (r1, r2 io.ReadCloser, err error)
DrainBody is from httputil.
Types ¶
type ResponseError ¶
type ResponseError struct {
// contains filtered or unexported fields
}
func NewResponseError ¶
func NewResponseError(err error, failReason string) *ResponseError
func (*ResponseError) Error ¶
func (e *ResponseError) Error() string
func (*ResponseError) FailReason ¶
func (e *ResponseError) FailReason() string
func (*ResponseError) Unwrap ¶
func (e *ResponseError) Unwrap() error
Click to show internal directories.
Click to hide internal directories.