Documentation
¶
Index ¶
- Constants
- type Client
- type ClientOption
- type Option
- func WithBody(body io.Reader) Option
- func WithContext(ctx context.Context) Option
- func WithForm(data map[string]string) Option
- func WithHeaders(headers map[string]string) Option
- func WithHost(host string) Option
- func WithJson(data interface{}) Option
- func WithNeverTimeout() Option
- func WithQueryParams(data map[string]string) Option
- func WithRequest(reqFunc func(req *http.Request)) Option
- func WithTimeout(timeout time.Duration) Option
Constants ¶
View Source
const NeverTimeout = time.Duration(-1)
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
func New ¶
func New(opts ...ClientOption) *Client
type ClientOption ¶
func WithClientTimeout ¶
func WithClientTimeout(timeout time.Duration) ClientOption
type Option ¶
type Option func(*option) error
func WithContext ¶
func WithHeaders ¶
func WithNeverTimeout ¶
func WithNeverTimeout() Option
func WithQueryParams ¶
func WithRequest ¶
func WithTimeout ¶
Click to show internal directories.
Click to hide internal directories.