Documentation
¶
Index ¶
- type HttpClient
- func (h *HttpClient) GetCookie(packet string, method string, url string) (string, error)
- func (h *HttpClient) HttpGet(url string) ([]byte, error)
- func (h *HttpClient) HttpsPostForm(url string, data url.Values) ([]byte, error)
- func (h *HttpClient) PostFile(file string, url string) (body []byte, err error)
- func (h *HttpClient) PostFileBytes(data []byte, url string) (rsp []byte, err error)
- func (h *HttpClient) SendUpstream(packet string, method string, url string) ([]byte, error)
- func (h *HttpClient) SetHeader(k, v string) *HttpClient
- func (h *HttpClient) SetStreamFlag(v bool) *HttpClient
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type HttpClient ¶
func NewHttpsC ¶
func NewHttpsC(maxconns int, crtpath ...string) *HttpClient
func NewHttpsK ¶
func NewHttpsK(maxconns int, svrCrt, cliCrt, cliKey string) *HttpClient
func (*HttpClient) HttpsPostForm ¶
func (*HttpClient) PostFile ¶
func (h *HttpClient) PostFile(file string, url string) (body []byte, err error)
http 客户端POST文件数据 file 要发送的文件数据([]byte)或文件路径名(string) url 地址
func (*HttpClient) PostFileBytes ¶
func (h *HttpClient) PostFileBytes(data []byte, url string) (rsp []byte, err error)
http 客户端POST文件数据 file 要发送的文件数据([]byte) url 地址
func (*HttpClient) SendUpstream ¶
http 客户端发送数据 packet 要发送报文 method 选择发送方式 post get url 地址
func (*HttpClient) SetHeader ¶
func (h *HttpClient) SetHeader(k, v string) *HttpClient
func (*HttpClient) SetStreamFlag ¶
func (h *HttpClient) SetStreamFlag(v bool) *HttpClient
Click to show internal directories.
Click to hide internal directories.