Documentation ¶
Index ¶
- 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 ¶
This section is empty.
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.