Documentation
¶
Index ¶
- type Agent
- type Client
- func (c *Client) Close(ctx context.Context) error
- func (c *Client) Cookie(url, name string) (http.Cookie, bool)
- func (c *Client) Download(ctx context.Context, url string, headers map[string]string, reqBody io.Reader, ...) (*http.Response, error)
- func (c *Client) GetCSRF(url string) (string, bool)
- func (c *Client) GetClient() *http.Client
- func (c *Client) GetCookies(url *neturl.URL) []*http.Cookie
- func (c *Client) NewRequest() *resty.Request
- func (c *Client) Ping(ctx context.Context) error
- func (c *Client) Request(ctx context.Context, url string, req, resp interface{}, opts *Options) (*resty.Response, error)
- func (c *Client) SetCookies(url *neturl.URL, cookies []*http.Cookie)
- func (c *Client) Upload(ctx context.Context, url string, headers map[string]string, data io.Reader, ...) (*resty.Response, error)
- type Config
- type CryptoMode
- type Header
- type Options
- type UserAgent
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
func (*Client) GetCookies ¶ added in v0.2.0
GetCookies 获取cookies.
func (*Client) NewRequest ¶
func (*Client) Request ¶
func (c *Client) Request(ctx context.Context, url string, req, resp interface{}, opts *Options) (*resty.Response, error)
Request 接口请求.
func (*Client) SetCookies ¶ added in v0.2.0
SetCookies 设置cookies.
type Config ¶
type CryptoMode ¶
type CryptoMode string
const ( CryptoModeAPI CryptoMode = "api" CryptoModeEAPI CryptoMode = "eapi" CryptoModeWEAPI CryptoMode = "weapi" CryptoModeLinux CryptoMode = "linux" )
type Options ¶
type Options struct {
Method string
CryptoMode CryptoMode
Headers map[string]string
Cookies []*http.Cookie
}
func NewOptions ¶
func NewOptions() *Options
func (*Options) SetCookies ¶
Click to show internal directories.
Click to hide internal directories.