Documentation ¶
Index ¶
- type Client
- func (c *Client) EnableTor()
- func (c *Client) EnableTorProxy(proxy *Proxy)
- func (c Client) Get(url string) (*HTTPResponse, error)
- func (c Client) Post(url string, data string) (*HTTPResponse, error)
- func (c Client) PostJSON(url string, v interface{}) (*HTTPResponse, error)
- func (c Client) PostMsgPack(url string, v interface{}) (*HTTPResponse, error)
- func (c Client) PostXML(url string, v interface{}) (*HTTPResponse, error)
- func (c Client) Request(httpMethod string, reqURL string, body *string) (*HTTPResponse, error)
- func (c Client) SendJSON(httpMethod string, url string, v interface{}) (*HTTPResponse, error)
- func (c Client) SendMsgPack(httpMethod string, url string, v interface{}) (*HTTPResponse, error)
- func (c Client) SendXML(httpMethod string, url string, v interface{}) (*HTTPResponse, error)
- type HTTPResponse
- type Header
- type Proxy
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct { Header Header // contains filtered or unexported fields }
Client ...
func (*Client) EnableTorProxy ¶
EnableTorProxy with custom proxy
func (Client) Get ¶
func (c Client) Get(url string) (*HTTPResponse, error)
Get requests url and return http.Response
func (Client) PostJSON ¶
func (c Client) PostJSON(url string, v interface{}) (*HTTPResponse, error)
PostJSON posts object as JSON
func (Client) PostMsgPack ¶
func (c Client) PostMsgPack(url string, v interface{}) (*HTTPResponse, error)
PostMsgPack posts object as XML
func (Client) PostXML ¶
func (c Client) PostXML(url string, v interface{}) (*HTTPResponse, error)
PostXML posts object as XML
func (Client) SendJSON ¶
func (c Client) SendJSON(httpMethod string, url string, v interface{}) (*HTTPResponse, error)
SendJSON sends object as JSON
func (Client) SendMsgPack ¶
func (c Client) SendMsgPack(httpMethod string, url string, v interface{}) (*HTTPResponse, error)
SendMsgPack sends object as MsgPack
type HTTPResponse ¶
HTTPResponse ...
func (HTTPResponse) Feed ¶
func (r HTTPResponse) Feed() (*gofeed.Feed, error)
Feed the response as *gofeed.Feed
func (HTTPResponse) FromMsgPack ¶
func (r HTTPResponse) FromMsgPack(v interface{}) error
FromMsgPack the response as *gofeed.Feed
func (HTTPResponse) HTML ¶
func (r HTTPResponse) HTML() (*goquery.Document, error)
HTML the response as *goquery.Document
func (HTTPResponse) JSON ¶
func (r HTTPResponse) JSON(v interface{}) error
JSON requests url and writes data to interface v
func (HTTPResponse) String ¶
func (r HTTPResponse) String() (*string, error)
Click to show internal directories.
Click to hide internal directories.