Documentation ¶
Index ¶
Constants ¶
View Source
const DefaultUa = "Mozilla/5.0 (Windows NT 6.1; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko)" +
" Chrome/76.0.3809.132 Safari/537.36 C845D9D38B3A68F4F74057DB542AD252 tx/2.0"
Variables ¶
View Source
var ContentTypes = map[string]string{
"json": "application/json",
"xml": "application/xml",
"soap": "application/soap+xml",
"multipart": "multipart/form-data",
"form": "application/x-www-form-urlencoded; charset=utf-8",
}
Functions ¶
Types ¶
type ReqInfo ¶
ReqInfo 是一个HTTP请求元素的封装,可以快速进行简单的http请求
func (*ReqInfo) RequestWithOptions ¶
func (r *ReqInfo) RequestWithOptions(options *ReqOptions) (*Response, error)
type ReqOptions ¶
Click to show internal directories.
Click to hide internal directories.