Documentation ¶
Overview ¶
Package guzzle @Author: asus @Description: $ @File: client @Data: 2022/1/2016:41
Package guzzle @Author: asus @Description: $ @File: options @Data: 2022/1/2016:41
Package guzzle @Author: asus @Description: $ @File: param @Data: 2022/1/2016:51
Package guzzle @Author: asus @Description: $ @File: response @Data: 2022/1/2017:59
Index ¶
- type Client
- func (c *Client) Delete(path string) (*Response, error)
- func (c *Client) Get(path string) (*Response, error)
- func (c *Client) Post(path string) (*Response, error)
- func (c *Client) Put(path string) (*Response, error)
- func (c *Client) Request(method, path string) (*Response, error)
- func (c *Client) RequestForm(form map[string][]string) *Client
- func (c *Client) RequestHeader(key, value string) *Client
- func (c *Client) RequestHeaders() map[string]string
- func (c *Client) RequestJSON(v interface{}) *Client
- func (c *Client) RequestQuery(query map[string][]string) *Client
- func (c *Client) RequestSetBody(body []byte) *Client
- type Options
- type OptionsFunc
- type Request
- func (r *Request) Body(body []byte)
- func (r *Request) Form(form map[string][]string)
- func (r *Request) Header(key, value string)
- func (r *Request) Headers() map[string]string
- func (r *Request) JSON(v interface{}) error
- func (r *Request) Query(query map[string][]string)
- func (r *Request) String() string
- type Response
- func (r *Response) Body() []byte
- func (r *Response) Cookie(key string) string
- func (r *Response) Cookies() []*http.Cookie
- func (r *Response) Header(key string) string
- func (r *Response) Headers() map[string]string
- func (r *Response) JSON(v interface{}) error
- func (r *Response) Status() int
- func (r *Response) String() string
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
func (*Client) RequestForm ¶
RequestForm 设置Form请求体
func (*Client) RequestHeader ¶
RequestHeader 设置请求头
func (*Client) RequestHeaders ¶
RequestHeaders 获取请求Header头信息
func (*Client) RequestJSON ¶
RequestJSON 设置Json请求体
func (*Client) RequestQuery ¶
RequestQuery 设置请求参数
func (*Client) RequestSetBody ¶
RequestSetBody 设置请求体
type OptionsFunc ¶
type OptionsFunc func(*Client)
func WithHead ¶
func WithHead(key, value string) OptionsFunc
type Request ¶
type Request struct {
// contains filtered or unexported fields
}
func NewRequest ¶
func NewRequest() *Request
Click to show internal directories.
Click to hide internal directories.