Documentation ¶
Index ¶
- Variables
- func Deflate() *compression
- func Gzip() *compression
- func SetConnectTimeout(duration time.Duration)
- func Zlib() *compression
- type Body
- type Error
- type Request
- func (r *Request) AddCookie(c *http.Cookie)
- func (r *Request) AddHeader(name string, value string)
- func (r Request) Do() (*Response, error)
- func (r Request) NewRequest() (*http.Request, error)
- func (r Request) WithCookie(c *http.Cookie) Request
- func (r Request) WithHeader(name string, value string) Request
- type Response
Constants ¶
This section is empty.
Variables ¶
View Source
var DefaultClient = &http.Client{Transport: DefaultTransport}
View Source
var DefaultDialer = &net.Dialer{Timeout: 10000 * time.Millisecond}
View Source
var DefaultTransport http.RoundTripper = &http.Transport{Dial: DefaultDialer.Dial, Proxy: http.ProxyFromEnvironment}
Functions ¶
func SetConnectTimeout ¶
Types ¶
type Request ¶
type Request struct { Method string Uri string Body interface{} QueryString interface{} Timeout time.Duration Multipart bool ContentType string Accept string Host string UserAgent string Insecure bool MaxRedirects int RedirectHeaders bool Proxy string Compression *compression BasicAuthUsername string BasicAuthPassword string CookieJar http.CookieJar ShowDebug bool OnBeforeRequest func(request *Request, httpreq *http.Request) // contains filtered or unexported fields }
Click to show internal directories.
Click to hide internal directories.