Documentation ¶
Index ¶
- type Cookies
- type HttpClientWrapper
- func (h *HttpClientWrapper) AddCookie(cookies []*http.Cookie)
- func (h *HttpClientWrapper) AppendPostRequest(f PostRequestFunc)
- func (h *HttpClientWrapper) AppendPreRequest(f PreRequestFunc)
- func (h *HttpClientWrapper) Do(req *http.Request) (resp *http.Response, err error)
- func (h *HttpClientWrapper) EnableRandomReferer()
- func (h *HttpClientWrapper) EnableRandomUA()
- func (h *HttpClientWrapper) GET(u string) (resp *http.Response, err error)
- func (h *HttpClientWrapper) GetCookie(u *url.URL) Cookies
- func (h *HttpClientWrapper) POST(u string, body io.Reader, contentType string) (resp *http.Response, err error)
- func (h *HttpClientWrapper) POSTForm(u string, data url.Values) (resp *http.Response, err error)
- func (h *HttpClientWrapper) ResetCookie()
- func (h *HttpClientWrapper) SetCookieJar(j *cookiejar.Jar)
- type PostRequestFunc
- type PreRequestFunc
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type HttpClientWrapper ¶
type HttpClientWrapper struct {
// contains filtered or unexported fields
}
func NewHttpClientWrapper ¶
func NewHttpClientWrapper(client *http.Client) *HttpClientWrapper
func (*HttpClientWrapper) AddCookie ¶
func (h *HttpClientWrapper) AddCookie(cookies []*http.Cookie)
func (*HttpClientWrapper) AppendPostRequest ¶
func (h *HttpClientWrapper) AppendPostRequest(f PostRequestFunc)
func (*HttpClientWrapper) AppendPreRequest ¶
func (h *HttpClientWrapper) AppendPreRequest(f PreRequestFunc)
func (*HttpClientWrapper) EnableRandomReferer ¶
func (h *HttpClientWrapper) EnableRandomReferer()
func (*HttpClientWrapper) EnableRandomUA ¶
func (h *HttpClientWrapper) EnableRandomUA()
func (*HttpClientWrapper) GET ¶
func (h *HttpClientWrapper) GET(u string) (resp *http.Response, err error)
func (*HttpClientWrapper) ResetCookie ¶
func (h *HttpClientWrapper) ResetCookie()
func (*HttpClientWrapper) SetCookieJar ¶
func (h *HttpClientWrapper) SetCookieJar(j *cookiejar.Jar)
type PreRequestFunc ¶
Click to show internal directories.
Click to hide internal directories.