Documentation
¶
Index ¶
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
}
Client is a simple wrapper around the general Flaresolverr and represents a client to talk with Flaresolverr API.
func (*Client) Get ¶
Get requests web page with method http.Get and returns Solution.Response as raw bytes. For more detail, refer to https://github.com/FlareSolverr/FlareSolverr#-requestget.
func (*Client) GetRaw ¶
GetRaw requests web page with method http.Get and returns whole Response. For more detail, refer to https://github.com/FlareSolverr/FlareSolverr#-requestget.
func (*Client) Post ¶
func (c *Client) Post(p PostParams) ([]byte, error)
Post requests web page with method http.Post and returns Solution.Response as raw bytes. For more detail, refer to https://github.com/FlareSolverr/FlareSolverr#-requestpost.
func (*Client) PostRaw ¶
func (c *Client) PostRaw(p PostParams) (Response, error)
PostRaw requests web page with method http.Post and returns whole Response. For more detail, refer to https://github.com/FlareSolverr/FlareSolverr#-requestpost.
type Config ¶
type Config struct { // BaseURL is for Flaresolverr URL. Default: http://localhost:8191/v1. BaseURL string // Global Timeout to solve the challenge in milliseconds. Default: No timeout. Timeout int }
Config holds parameters for calling Flaresolverr NewClient.
type Cookies ¶
Cookies is a helper to manage cookie from Flaresolverr API.
func (Cookies) MarshalJSON ¶
MarshalJSON is a custom function for marshalling Cookies.
func (*Cookies) UnmarshalJSON ¶
UnmarshalJSON is a custom function for UnmarshalJSON Cookies.
type GetParams ¶
type GetParams struct { URL string // MaxTimeout to solve the challenge in milliseconds for current API // It replaces global timeout from Config.Timeout. Default: No timeout. MaxTimeout int Cookies Cookies ReturnOnlyCookies bool }
GetParams holds parameters for calling Get.
type PostParams ¶
type PostParams struct { URL string PostData url.Values MaxTimeout int Cookies Cookies ReturnOnlyCookies bool }
PostParams holds parameters for calling Post.
type Response ¶
type Response struct { Status status `json:"status,omitempty"` Message string `json:"message,omitempty"` Solution Solution `json:"solution"` StartTimestamp int64 `json:"startTimestamp"` EndTimestamp int64 `json:"endTimestamp"` Version string `json:"version"` }
Response holds raw response from Flaresolverr API.