internal

package
v0.0.0-...-0d114ba Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 10, 2024 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Cookies

type Cookies []*http.Cookie

func (Cookies) Find

func (c Cookies) Find(key string) *http.Cookie

func (Cookies) Len

func (c Cookies) Len() int

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) Do

func (h *HttpClientWrapper) Do(req *http.Request) (resp *http.Response, err error)

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) GetCookie

func (h *HttpClientWrapper) GetCookie(u *url.URL) Cookies

func (*HttpClientWrapper) POST

func (h *HttpClientWrapper) POST(u string, body io.Reader, contentType string) (resp *http.Response, err error)

func (*HttpClientWrapper) POSTForm

func (h *HttpClientWrapper) POSTForm(u string, data url.Values) (resp *http.Response, err error)

func (*HttpClientWrapper) ResetCookie

func (h *HttpClientWrapper) ResetCookie()

func (*HttpClientWrapper) SetCookieJar

func (h *HttpClientWrapper) SetCookieJar(j *cookiejar.Jar)

type PostRequestFunc

type PostRequestFunc func(req *http.Request, resp *http.Response) error

type PreRequestFunc

type PreRequestFunc func(req *http.Request) error

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL