Documentation
¶
Index ¶
- type Context
- type FileParam
- type HttpClient
- func (c *HttpClient) Get(url string, params map[string]string) (res []byte, err error)
- func (c *HttpClient) GetByRes(url string, params map[string]string, result interface{}) (response *resty.Response, err error)
- func (c *HttpClient) PostFile(url string, params map[string]string, files []FileParam) (response *resty.Response, err error)
- func (c *HttpClient) PostFileByRes(url string, params map[string]string, files []FileParam, result interface{}) (response *resty.Response, err error)
- func (c *HttpClient) PostForm(url string, params map[string]string) (response *resty.Response, err error)
- func (c *HttpClient) PostFormByRes(url string, params map[string]string, result interface{}) (response *resty.Response, err error)
- func (c *HttpClient) PostJson(url string, params interface{}) (response *resty.Response, err error)
- func (c *HttpClient) PostJsonByRes(url string, params, result interface{}) (response *resty.Response, err error)
- func (c *HttpClient) SetCookie(cookies map[string]string) *HttpClient
- func (c *HttpClient) SetHeaders(headers map[string]string) *HttpClient
- func (c *HttpClient) SetProxy(proxyURL string) *HttpClient
- type URLSetting
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type HttpClient ¶
type HttpClient struct {
// contains filtered or unexported fields
}
func (*HttpClient) GetByRes ¶
func (c *HttpClient) GetByRes(url string, params map[string]string, result interface{}) (response *resty.Response, err error)
func (*HttpClient) PostFileByRes ¶
func (*HttpClient) PostForm ¶
func (c *HttpClient) PostForm(url string, params map[string]string) (response *resty.Response, err error)
func (*HttpClient) PostFormByRes ¶
func (c *HttpClient) PostFormByRes(url string, params map[string]string, result interface{}) (response *resty.Response, err error)
func (*HttpClient) PostJson ¶
func (c *HttpClient) PostJson(url string, params interface{}) (response *resty.Response, err error)
func (*HttpClient) PostJsonByRes ¶
func (c *HttpClient) PostJsonByRes(url string, params, result interface{}) (response *resty.Response, err error)
func (*HttpClient) SetCookie ¶
func (c *HttpClient) SetCookie(cookies map[string]string) *HttpClient
func (*HttpClient) SetHeaders ¶
func (c *HttpClient) SetHeaders(headers map[string]string) *HttpClient
func (*HttpClient) SetProxy ¶
func (c *HttpClient) SetProxy(proxyURL string) *HttpClient
type URLSetting ¶
Click to show internal directories.
Click to hide internal directories.