Documentation ¶
Index ¶
- type Requests
- func (r *Requests) AsyncGet(requestURL string, options ...func(*Requests)) (<-chan *Response, error)
- func (r *Requests) AsyncPost(requestURL, bodyType string, body io.Reader, options ...func(*Requests)) (<-chan *Response, error)
- func (r *Requests) Delete(requestURL string, options ...func(*Requests)) (*Response, error)
- func (r *Requests) Get(requestURL string, options ...func(*Requests)) (*Response, error)
- func (r *Requests) Head(requestURL string, options ...func(*Requests)) (*Response, error)
- func (r *Requests) JSONPost(requestURL string, body interface{}, options ...func(*Requests)) (*Response, error)
- func (r *Requests) Options(requestURL string) (*Response, error)
- func (r *Requests) Patch(requestURL, bodyType string, body io.Reader, options ...func(*Requests)) (*Response, error)
- func (r *Requests) Post(requestURL, bodyType string, body io.Reader, options ...func(*Requests)) (*Response, error)
- func (r *Requests) Put(requestURL, bodyType string, body io.Reader, options ...func(*Requests)) (*Response, error)
- func (r *Requests) XMLPost(requestURL string, body interface{}, options ...func(*Requests)) (*Response, error)
- type Response
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Requests ¶
func (*Requests) AsyncGet ¶
func (r *Requests) AsyncGet(requestURL string, options ...func(*Requests)) (<-chan *Response, error)
AsyncGet sends an HTTP GET request to the provided URL and returns ch <-chan *http.Response immediately.
func (*Requests) AsyncPost ¶
func (r *Requests) AsyncPost(requestURL, bodyType string, body io.Reader, options ...func(*Requests)) (<-chan *Response, error)
AsyncPost sends an HTTP POST request to the provided URL and returns a <-chan *http.Response immediately.
func (*Requests) Head ¶
Head sends an HTTP HEAD request to the specified URL, with the ability to add query parameters, headers, and timeout, among other options..
func (*Requests) JSONPost ¶
func (r *Requests) JSONPost(requestURL string, body interface{}, options ...func(*Requests)) (*Response, error)
JSONPost Marshals request data as JSON and set the content type to "application/json".
func (*Requests) Options ¶
Options sends a rarely-used HTTP OPTIONS request to the provided URL. Options only permit a single parameter, which is the destination URL string.
func (*Requests) Patch ¶
func (r *Requests) Patch(requestURL, bodyType string, body io.Reader, options ...func(*Requests)) (*Response, error)
Patch sends an HTTP PATCH request to the provided URL with optional body to update the data.
func (*Requests) Post ¶
func (r *Requests) Post(requestURL, bodyType string, body io.Reader, options ...func(*Requests)) (*Response, error)
Post sends an HTTP POST request to the provided URL