Documentation ¶
Index ¶
Constants ¶
View Source
const (
ContentType = "Content-Type"
)
Variables ¶
This section is empty.
Functions ¶
func NewClient ¶
NewClient 创建一个http请求的客户端 proxyRaw 代理信息,空值则不使用代理;非空:"socks5://admin:password@192.168.1.2:8888" timeoutSecond 请求超时时间,秒
Types ¶
type RequestParams ¶ added in v0.0.3
func Merge ¶ added in v0.0.3
func Merge(global RequestParams, local RequestParams, custom RequestParams) RequestParams
Merge 将 local 合并到 global,然后将 custom 合并到 global ,最后返回 global。
func NewRequestParams ¶ added in v0.0.3
func NewRequestParams() RequestParams
type UserAgent ¶ added in v0.0.3
type UserAgent string
const ( UaPcWinMicrosoftEdge UserAgent = `` /* 134-byte string literal not displayed */ UaPcWinFirefox UserAgent = `Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:88.0) Gecko/20100101 Firefox/88.0` UaPcWinGoogleChrome UserAgent = `Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/83.0.4103.106 Safari/537.36` UaPcWin360Browser UserAgent = `Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/78.0.3904.108 Safari/537.36` UaPcWinSougouBrowser UserAgent = `` /* 127-byte string literal not displayed */ UaAndroidUCBrowser UserAgent = `` /* 159-byte string literal not displayed */ UaAndroidHuaWeiBrowser UserAgent = `` /* 134-byte string literal not displayed */ )
Click to show internal directories.
Click to hide internal directories.