Documentation ¶
Index ¶
- Constants
- func DefaultCookieJar(domain ...string) *cookiejar.Jar
- func Errors() []error
- type Client
- func (c *Client) CloseCookies()
- func (c *Client) Get(uri string, options map[string]interface{}) *Response
- func (c *Client) GetCookies() []*http.Cookie
- func (c *Client) GetErrors() []error
- func (c *Client) Head(uri string, options map[string]interface{}) *Response
- func (c *Client) Post(uri string, options map[string]interface{}) *Response
- func (c *Client) ResetErrors()
- type Response
Constants ¶
View Source
const ( COOKIES = `cookies` HEADERS = `headers` AUTH = `auth` JSON = `json` FORM_PARAMS = `form_params` MULTIPART = `multipart` MULTIPART_FILES = `files` BASE_URI = `base_uri` PROXY = `proxy` TIMEOUT = `timeout` QUERY = `query` HTTP2 = `http2` )
Variables ¶
This section is empty.
Functions ¶
func DefaultCookieJar ¶
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
func (*Client) CloseCookies ¶
func (c *Client) CloseCookies()
func (*Client) GetCookies ¶
func (*Client) Post ¶
发送post 请求,如果出错,则返回nil, 可以通过 GetErrors 拿到错误信息 options 可以设置 表单信息
form_params uploads json
这些会覆盖全局的
func (*Client) ResetErrors ¶
func (c *Client) ResetErrors()
ResetErrors每次请求前重置 可以通过配置 reset_error 的值为 false 来禁止
Click to show internal directories.
Click to hide internal directories.