Documentation ¶
Index ¶
- func HeaderAddBasicAuth(header map[string]string, username string, password string) map[string]string
- type HttpClient
- func (h *HttpClient) DoDelete(httpUrl string, params map[string]string, header map[string]string) (ret []byte, e error)
- func (h *HttpClient) DoDeleteRetJson(httpUrl string, params map[string]string, rsp interface{}, ...) (e error)
- func (h *HttpClient) DoGet(httpUrl string, params map[string]string, header map[string]string) (ret []byte, e error)
- func (h *HttpClient) DoGetRetJson(httpUrl string, params map[string]string, rsp interface{}, ...) (e error)
- func (h *HttpClient) DoPatch(httpUrl string, params map[string]string, header map[string]string) (ret []byte, e error)
- func (h *HttpClient) DoPatchRetJson(httpUrl string, params map[string]string, rsp interface{}, ...) (e error)
- func (h *HttpClient) DoPost(httpUrl string, params map[string]string, header map[string]string) (ret []byte, e error)
- func (h *HttpClient) DoPostRetJson(httpUrl string, params map[string]string, rsp interface{}, ...) (e error)
- func (h *HttpClient) DoPut(httpUrl string, params map[string]string, header map[string]string) (ret []byte, e error)
- func (h *HttpClient) DoPutEmptyRetJson(httpUrl string, rsp interface{}, header map[string]string) (e error)
- func (h *HttpClient) DoPutRetJson(httpUrl string, params map[string]string, rsp interface{}, ...) (e error)
- func (h *HttpClient) DoRequest(httpUrl string, params interface{}, httpMethod Method, ...) (ret []byte, e error)
- func (h *HttpClient) DoRequest2(httpUrl string, params interface{}, httpMethod Method, ...) (ret []byte, statsCode int, e error)
- func (h *HttpClient) DoRequest2WithRetHeader(httpUrl string, params interface{}, httpMethod Method, ...) (ret []byte, statsCode int, rspHeader http.Header, e error)
- func (h *HttpClient) DoRequest2WithRetRsp(httpUrl string, params interface{}, httpMethod Method, ...) (res *http.Response, e error)
- func (h *HttpClient) DoRequestJsonWithRetHeader2(httpUrl string, jsonData interface{}, header map[string]string, method Method) (ret []byte, statsCode int, rspHeader http.Header, e error)
- func (h *HttpClient) DoRequestPostJson(httpUrl string, jsonData interface{}, header map[string]string) (ret []byte, statsCode int, e error)
- func (h *HttpClient) DoRequestPostJsonWithRetHeader(httpUrl string, jsonData interface{}, header map[string]string) (ret []byte, statsCode int, rspHeader http.Header, e error)
- func (h *HttpClient) DoRequestRetJson(httpUrl string, params map[string]string, httpMethod Method, ret interface{}, ...) (e error)
- func (c *HttpClient) FetchResult(httpUrl string, params interface{}, method Method, header map[string]string) (ret []byte, statusCode int, rspHeader http.Header, e error)
- func (h *HttpClient) GetHttpClient() *http.Client
- func (h *HttpClient) Init(proxy string) (e error)
- func (h *HttpClient) SendJson(method Method, url string, data interface{}, headers map[string]string) (*http.Response, error)
- func (c *HttpClient) SendRequest(httpUrl string, params interface{}, method Method, header map[string]string) (res *http.Response, e error)
- type Method
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type HttpClient ¶
type HttpClient struct {
// contains filtered or unexported fields
}
func NewHttpClient ¶
func NewHttpClient(proxy string) (ret *HttpClient, e error)
func (*HttpClient) DoDeleteRetJson ¶
func (*HttpClient) DoGetRetJson ¶
func (*HttpClient) DoPatchRetJson ¶
func (*HttpClient) DoPostRetJson ¶
func (*HttpClient) DoPutEmptyRetJson ¶
func (h *HttpClient) DoPutEmptyRetJson(httpUrl string, rsp interface{}, header map[string]string) (e error)
func (*HttpClient) DoPutRetJson ¶
func (*HttpClient) DoRequest2 ¶
func (*HttpClient) DoRequest2WithRetHeader ¶
func (*HttpClient) DoRequest2WithRetRsp ¶
func (*HttpClient) DoRequestJsonWithRetHeader2 ¶
func (*HttpClient) DoRequestPostJson ¶
func (*HttpClient) DoRequestPostJsonWithRetHeader ¶
func (*HttpClient) DoRequestRetJson ¶
func (*HttpClient) FetchResult ¶
func (*HttpClient) GetHttpClient ¶
func (h *HttpClient) GetHttpClient() *http.Client
func (*HttpClient) Init ¶
func (h *HttpClient) Init(proxy string) (e error)
func (*HttpClient) SendRequest ¶
Click to show internal directories.
Click to hide internal directories.