Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var (
ErrInvalidRequestURL = errors.New("invalid request url, we only support https:// or http://")
)
Functions ¶
func DefaultConfigRoot ¶
DefaultConfigRoot will generate the default config path based on the user and his running environment.
Types ¶
type Client ¶
type Client struct { *resty.Client *Config }
Client is the wrapper for resty.Client we may provide extra method on this wrapper.
func (*Client) CleanCookies ¶ added in v0.9.3
func (c *Client) CleanCookies()
func (*Client) SetDefaultHostname ¶ added in v0.8.0
type Config ¶
type Config struct { HTTPS bool // If the request was under the https of http. Host string // The request host name. Proxy string // The proxy address, such as the http://127.0.0.1:7890, socks://127.0.0.1:7890 ConfigRoot string // The root config path for the whole bookhunter download service. // The custom redirect function. Redirect resty.RedirectPolicy `json:"-"` }
Config is the basic configuration for creating the client.
func (*Config) ConfigPath ¶
ConfigPath will return a unique path for this download service.
Click to show internal directories.
Click to hide internal directories.