Documentation ¶ Index ¶ Variables type CURL func Get(url string) *CURL func New(method, url string, body io.Reader) *CURL func Post(url string, body io.Reader) *CURL func PostJSON(url string, x interface{}) *CURL func (c *CURL) ReadBytes() ([]byte, error) func (c *CURL) ReadJSON(x interface{}) error func (c *CURL) Send() *CURL func (c *CURL) SetHeader(key, value string) *CURL func (c *CURL) SetHeaderList(vstr ...string) *CURL func (c *CURL) SetURLQuery(value url.Values) *CURL Constants ¶ This section is empty. Variables ¶ View Source var ( ErrInvalidResponse = errors.New("the response is invalid") ) Functions ¶ This section is empty. Types ¶ type CURL ¶ type CURL struct { Request *http.Request Response *http.Response Error error } Request ... func Get ¶ func Get(url string) *CURL Get ... func New ¶ func New(method, url string, body io.Reader) *CURL New ... func Post ¶ func Post(url string, body io.Reader) *CURL Post ... func PostJSON ¶ func PostJSON(url string, x interface{}) *CURL PostJSON ... func (*CURL) ReadBytes ¶ func (c *CURL) ReadBytes() ([]byte, error) ReadBytes ... func (*CURL) ReadJSON ¶ func (c *CURL) ReadJSON(x interface{}) error ReadJSON ... func (*CURL) Send ¶ func (c *CURL) Send() *CURL Send ... func (*CURL) SetHeader ¶ func (c *CURL) SetHeader(key, value string) *CURL SetHeader ... func (*CURL) SetHeaderList ¶ func (c *CURL) SetHeaderList(vstr ...string) *CURL SetHeaderList ... func (*CURL) SetURLQuery ¶ added in v0.1.5 func (c *CURL) SetURLQuery(value url.Values) *CURL Source Files ¶ View all Source files curl.go Click to show internal directories. Click to hide internal directories.