Documentation
¶
Index ¶
- type Request
- func (this *Request) Delete() (*Response, error)
- func (this *Request) Get() (*Response, error)
- func (this *Request) PATCH() (*Response, error)
- func (this *Request) PUT() (*Response, error)
- func (this *Request) Post() (*Response, error)
- func (this *Request) Put() (*Response, error)
- func (this *Request) Send(url string, method string) (*Response, error)
- func (this *Request) SetCookies(cookies map[string]string) *Request
- func (this *Request) SetDialTimeOut(TimeOutSecond int)
- 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) SetRawData(data string) *Request
- func (this *Request) SetResponseTimeOut(TimeOutSecond int)
- func (this *Request) SetTlsConfig(config *tls.Config) *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{} TlsConfig *tls.Config RawData string // contains filtered or unexported fields }
Request构造类
func (*Request) SetCookies ¶
设置请求cookies
func (*Request) SetDialTimeOut ¶ added in v0.1.1
SetDialTimeOut
func (*Request) SetHeaders ¶
设置请求头
func (*Request) SetPostData ¶
设置post请求的提交数据
func (*Request) SetQueries ¶
设置url查询参数
func (*Request) SetRawData ¶ added in v0.1.1
func (*Request) SetResponseTimeOut ¶ added in v0.1.1
SetResponseTimeOut
func (*Request) SetTlsConfig ¶ added in v0.1.1
Click to show internal directories.
Click to hide internal directories.