Documentation ¶
Index ¶
- func Do(f func(*gout.Client) *dataflow.DataFlow, out interface{}, options ...Option) error
- func Get(url string, params interface{}, out interface{}, options ...Option) error
- func PostBody(url string, body []byte, out interface{}, options ...Option) error
- func PostForm(url string, params gout.H, out interface{}, options ...Option) error
- func PostJson(url string, params gout.H, out interface{}, options ...Option) error
- func PostWWWForm(url string, params gout.H, out interface{}, options ...Option) error
- func RandomUA(entry FakeUAEntry) string
- type FakeUAEntry
- type Option
- func AddRandomUAOption(entry FakeUAEntry) Option
- func AddUAOption(ua ...string) Option
- func CookieOption(name, value string) Option
- func DebugOption() Option
- func DisableTlsOption() Option
- func GetResponseCookieOption(cookies *[]*http.Cookie) Option
- func HeaderOption(key, value string) Option
- func HttpCodeOption(code *int) Option
- func HttpCookieOption(cookie *http.Cookie) Option
- func NotIgnoreEmptyOption() Option
- func ProxyCallbackOption(f func(out interface{}, proxy string)) Option
- func ProxyOption(prefer proxy_pool.Prefer) Option
- func RawProxyOption(proxy string) Option
- func RequestAutoHostOption() Option
- func RetryOption(retry int) Option
- func TimeoutOption(d time.Duration) Option
- func WithCookieJar(jar http.CookieJar) Option
- func WithResponseMiddleware(middler middler.ResponseMiddler) Option
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func PostWWWForm ¶ added in v1.0.1
func RandomUA ¶ added in v1.1.1
func RandomUA(entry FakeUAEntry) string
RandomUA entry is in ['android', 'chrome', 'computer', 'firefox', 'internet-explorer', 'ios', 'ipad', 'iphone', 'linux', 'mac-os-x', 'mobile', 'safari']
Types ¶
type FakeUAEntry ¶ added in v1.1.1
type FakeUAEntry string
const ( Android FakeUAEntry = "android" Chrome FakeUAEntry = "chrome" Computer FakeUAEntry = "computer" Firefox FakeUAEntry = "firefox" InternetExplorer FakeUAEntry = "internet-explorer" Ios FakeUAEntry = "ios" Ipad FakeUAEntry = "ipad" Iphone FakeUAEntry = "iphone" Linux FakeUAEntry = "linux" MacOsX FakeUAEntry = "mac-os-x" Mobile FakeUAEntry = "mobile" Safari FakeUAEntry = "safari" )
type Option ¶
type Option func(o *option)
func AddRandomUAOption ¶ added in v1.1.1
func AddRandomUAOption(entry FakeUAEntry) Option
func AddUAOption ¶
func CookieOption ¶
func DebugOption ¶
func DebugOption() Option
func DisableTlsOption ¶
func DisableTlsOption() Option
func GetResponseCookieOption ¶ added in v1.0.0
func HeaderOption ¶
func HttpCodeOption ¶ added in v1.0.0
func HttpCookieOption ¶
func NotIgnoreEmptyOption ¶ added in v1.0.9
func NotIgnoreEmptyOption() Option
func ProxyCallbackOption ¶ added in v1.0.0
func ProxyOption ¶
func ProxyOption(prefer proxy_pool.Prefer) Option
func RawProxyOption ¶ added in v1.0.8
func RequestAutoHostOption ¶ added in v1.0.9
func RequestAutoHostOption() Option
func RetryOption ¶ added in v1.0.0
func TimeoutOption ¶
func WithCookieJar ¶ added in v1.0.0
WithCookieJar CookieJar可能导致Cookie泄漏,谨慎使用
func WithResponseMiddleware ¶ added in v1.0.0
func WithResponseMiddleware(middler middler.ResponseMiddler) Option
Click to show internal directories.
Click to hide internal directories.