Documentation ¶
Index ¶
- func HttpGet(url string, queries map[string]string) (string, error)
- func HttpPost(url string, queries map[string]string, postData map[string]interface{}) (string, error)
- type Request
- func (this *Request) Get() (*Response, error)
- func (this *Request) Post() (*Response, error)
- func (this *Request) Send(url string, method string) (*Response, error)
- func (this *Request) SetCookies(cookies map[string]string) *Request
- func (this *Request) SetHeaders(headers map[string]string) *Request
- func (this *Request) SetMethod(method string) *Request
- func (this *Request) SetPostData(postData map[string]interface{}) *Request
- func (this *Request) SetQueries(queries map[string]string) *Request
- func (this *Request) SetUrl(url string) *Request
- type Response
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Request ¶
type Request struct { Raw *http.Request Method string Url string Headers map[string]string Cookies map[string]string Queries map[string]string PostData map[string]interface{} // contains filtered or unexported fields }
Request构造类
func (*Request) SetCookies ¶
设置请求cookies
func (*Request) SetHeaders ¶
设置请求头
func (*Request) SetPostData ¶
设置post请求的提交数据
func (*Request) SetQueries ¶
设置url查询参数
Click to show internal directories.
Click to hide internal directories.