Documentation ¶
Index ¶
- type Client
- func (c *Client) Delete(url string) error
- func (c *Client) Do(req *http.Request) (*http.Response, error)
- func (c *Client) Get(url string, v ...interface{}) error
- func (c *Client) GetAndIteratePagination(endpoint string, v interface{}) error
- func (c *Client) Head(url string) error
- func (c *Client) Post(url string, v ...interface{}) error
- func (c *Client) Put(url string, v ...interface{}) error
- type Error
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 util for common HTTP operations, such Get, Head, Post, Put and Delete. Use Do instead if those methods can not meet your requirement
func NewClient ¶
NewClient creates an instance of Client. Use net/http.Client as the default value if c is nil. Modifiers modify the request before sending it.
func (*Client) GetAndIteratePagination ¶ added in v1.8.0
GetAndIteratePagination iterates the pagination header and returns all resources The parameter "v" must be a pointer to a slice
Click to show internal directories.
Click to hide internal directories.