Documentation ¶
Index ¶
- func CheckResponse(r *http.Response) error
- func DoRequestWithClient(ctx context.Context, client *http.Client, req *http.Request) (*http.Response, error)
- func DumpInterceptor(req *http.Request, handler Handler) (*http.Response, error)
- func ResponseInterceptor(req *http.Request, handler Handler) (*http.Response, error)
- type Client
- type ClientOpt
- type ErrorResponse
- type Handler
- type Interceptor
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CheckResponse ¶
func DoRequestWithClient ¶
func DumpInterceptor ¶ added in v0.2.0
DumpInterceptor logs dump request and response
Types ¶
type Client ¶
type Client struct { BaseURL *url.URL UserAgent string Authorization string // contains filtered or unexported fields }
func (*Client) AddInterceptor ¶ added in v0.2.0
func (c *Client) AddInterceptor(inter Interceptor) error
type ClientOpt ¶
func SetAuthorization ¶
func SetBaseURL ¶
func SetInterceptor ¶ added in v0.2.0
func SetInterceptor(inter Interceptor) ClientOpt
func SetUserAgent ¶
type ErrorResponse ¶
func (*ErrorResponse) Error ¶
func (r *ErrorResponse) Error() string
Click to show internal directories.
Click to hide internal directories.