Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var DefaultCheckRedirect = RedirectAfterN(defaultRedirects)
DefaultCheckRedirect returns http.Client.CheckRedirect func with defaultRedirects
View Source
var DefaultClient = New(nil)
DefaultClient has default timeout and stdlib default transport no cookie management
View Source
var NoCheckRedirect = RedirectAfterN(0)
NoCheckRedirect returns http.Client.CheckRedirect func with no redirect
Functions ¶
func ApplyDefaultRq ¶
ApplyDefaultRq overrides Rq properties with default value if key is not set
func RedirectAfterN ¶
RedirectAfterN returns http.Client.CheckRedirect func
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
Client contains stdlib http client and other custom client settings
func (*Client) Send ¶
Send sends the request and read it if read is true remember to close the res.Body if read is false Send also set content-type to application/x-www-form-urlencoded if form is available
type Option ¶
type Option struct { Timeout time.Duration // if 0, default timeout will be applied Jar *jar.Jar // if Jar is nil, there no cookie jar Proxy string // Proxy option is the sugar syntax for Transport.Proxy Transport http.RoundTripper CheckRedirect func(req *http.Request, via []*http.Request) error DefaultRq *rq.Rq }
Option contains client settings
Click to show internal directories.
Click to hide internal directories.