Documentation
¶
Index ¶
- func Request(method RequestMethod, url, params string, header interface{}) (string, error)
- func RequestWithCookie(method RequestMethod, url, params string, header interface{}, ...) (string, []*http.Cookie, error)
- func SynRequest(method RequestMethod, url, params string, header interface{}, ...) (string, []*http.Cookie, error)
- type RequestMethod
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Request ¶
func Request(method RequestMethod, url, params string, header interface{}) (string, error)
Request 带3次重试的网络请求
func RequestWithCookie ¶
func RequestWithCookie(method RequestMethod, url, params string, header interface{}, cookie []*http.Cookie) (string, []*http.Cookie, error)
RequestWithCookie 带3次重试的网络请求,添加Cookie
func SynRequest ¶
func SynRequest(method RequestMethod, url, params string, header interface{}, cookie []*http.Cookie) (string, []*http.Cookie, error)
SynRequest 同步网络请求
Types ¶
type RequestMethod ¶
type RequestMethod string
const ( RequestMethodGet RequestMethod = "GET" RequestMethodPost RequestMethod = "POST" RequestMethodPut RequestMethod = "PUT" RequestMethodDelete RequestMethod = "DELETE" RequestMethodHead RequestMethod = "HEAD" RequestMethodOptions RequestMethod = "OPTIONS" RequestMethodTrace RequestMethod = "TRACE" RequestMethodConnect RequestMethod = "CONNECT" )
func (RequestMethod) String ¶
func (r RequestMethod) String() string
Click to show internal directories.
Click to hide internal directories.