Documentation
¶
Index ¶
- type CookieJar
- type HttpClient
- func (this *HttpClient) ClearProxy() *HttpClient
- func (this *HttpClient) CustomizeTransport(f func(tr *http.Transport)) *HttpClient
- func (this *HttpClient) SetCookieJar(j *CookieJar) *HttpClient
- func (this *HttpClient) SetProxy(proxyUrl string) *HttpClient
- func (this *HttpClient) SetRedirect(f func(req *http.Request, via []*http.Request) error) *HttpClient
- func (this *HttpClient) SetSkipVerify(isSkipVerify bool) *HttpClient
- func (this *HttpClient) SetTimeout(t time.Duration) *HttpClient
- type Request
- func (this *Request) End() (*http.Response, string, error)
- func (this *Request) EndByte() (*http.Response, []byte, error)
- func (this *Request) EndFile(savePath, saveFileName string) (*http.Response, error)
- func (this *Request) GetError() error
- func (this *Request) GetResponse() *http.Response
- func (this *Request) Send(ctxs ...context.Context) *Request
- func (this *Request) SetBasicAuth(username, password string) *Request
- func (this *Request) SetBody(body body.Body) *Request
- func (this *Request) SetClient(client *HttpClient) *Request
- func (this *Request) SetCookies(cookies *[]*http.Cookie) *Request
- func (this *Request) SetDebug(d bool) *Request
- func (this *Request) SetHeader(name, value string) *Request
- func (this *Request) SetMethod(name string) *Request
- func (this *Request) SetParam(name, value string) *Request
- func (this *Request) SetUrl(url string) *Request
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CookieJar ¶
type CookieJar struct {
// contains filtered or unexported fields
}
func NewCookieJar ¶
func NewCookieJar() *CookieJar
type HttpClient ¶
type HttpClient struct {
// contains filtered or unexported fields
}
func NewHttpClient ¶
func NewHttpClient() *HttpClient
func (*HttpClient) ClearProxy ¶
func (this *HttpClient) ClearProxy() *HttpClient
func (*HttpClient) CustomizeTransport ¶ added in v1.1.2
func (this *HttpClient) CustomizeTransport(f func(tr *http.Transport)) *HttpClient
func (*HttpClient) SetCookieJar ¶
func (this *HttpClient) SetCookieJar(j *CookieJar) *HttpClient
func (*HttpClient) SetProxy ¶
func (this *HttpClient) SetProxy(proxyUrl string) *HttpClient
func (*HttpClient) SetRedirect ¶
func (this *HttpClient) SetRedirect(f func(req *http.Request, via []*http.Request) error) *HttpClient
func (*HttpClient) SetSkipVerify ¶
func (this *HttpClient) SetSkipVerify(isSkipVerify bool) *HttpClient
func (*HttpClient) SetTimeout ¶
func (this *HttpClient) SetTimeout(t time.Duration) *HttpClient
type Request ¶
type Request struct {
// contains filtered or unexported fields
}
func NewRequest ¶
func NewRequest(client *HttpClient) *Request
func (*Request) GetResponse ¶
func (*Request) SetBasicAuth ¶
func (*Request) SetClient ¶
func (this *Request) SetClient(client *HttpClient) *Request
Click to show internal directories.
Click to hide internal directories.