Documentation ¶
Index ¶
- func Get(urlStr string, query url.Values, headerOpt ...http.Header) (resStatus int, resHeader http.Header, resBody []byte, err error)
- func PostForm(urlStr string, queryBody url.Values, headerOpt ...http.Header) (resStatus int, resHeader http.Header, resBody []byte, err error)
- func PostJSON(urlStr string, jsonBody []byte, headerOpt ...http.Header) (resStatus int, resHeader http.Header, resBody []byte, err error)
- func Request(opt *Option) (resStatus int, resHeader http.Header, resBody []byte, err error)
- type Option
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Get ¶
func Get(urlStr string, query url.Values, headerOpt ...http.Header) (resStatus int, resHeader http.Header, resBody []byte, err error)
Get 发起 http get 请求
func PostForm ¶
func PostForm(urlStr string, queryBody url.Values, headerOpt ...http.Header) (resStatus int, resHeader http.Header, resBody []byte, err error)
PostForm 发起 http post 表单请求
Types ¶
Click to show internal directories.
Click to hide internal directories.