Documentation ¶
Index ¶
- Variables
- type HTTPClient
- func (c *HTTPClient) Get(url string) (*http.Response, error)
- func (c *HTTPClient) Head(url string) (*http.Response, error)
- func (c *HTTPClient) NewRequest(method, url string, body io.Reader) (*http.Request, error)
- func (c *HTTPClient) Post(url string, contentType string, body io.Reader) (*http.Response, error)
- func (c *HTTPClient) PostForm(url string, data url.Values) (*http.Response, error)
- type WSClient
Constants ¶
This section is empty.
Variables ¶
View Source
var DefaultHTTPClient = NewHTTPClient()
DefaultHTTPClient 默认的公共http客户端 建议没有特殊需求的功能都使用这个客户端
Functions ¶
This section is empty.
Types ¶
type HTTPClient ¶
HTTPClient 支持socks或者http代理的,以及cookie的http客户端
func (*HTTPClient) Get ¶
func (c *HTTPClient) Get(url string) (*http.Response, error)
Get 增强http.Client.Get方法
func (*HTTPClient) Head ¶
func (c *HTTPClient) Head(url string) (*http.Response, error)
Head 增强http.Client.Head方法
func (*HTTPClient) NewRequest ¶
NewRequest 使用客户端创建http请求
Click to show internal directories.
Click to hide internal directories.