Documentation
¶
Overview ¶
Package httputils is a net/http wrapper for easy outbound http requests.
Index ¶
- func AddAuth(username string, password string) option
- type Client
- func (c *Client) Delete(log *logrus.Entry, path string, body interface{}, output interface{}) error
- func (c *Client) Get(log *logrus.Entry, path string, body interface{}, output interface{}) error
- func (c *Client) Post(log *logrus.Entry, path string, body interface{}, output interface{}) error
- func (c *Client) Put(log *logrus.Entry, path string, body interface{}, output interface{}) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Client ¶
Client provides storage for data that doesn't need to change between requests
func New ¶
func New(options ...option) *Client
New creates and returns a new Client with custom options
func (*Client) Delete ¶
Delete performs a DELETE request using the net/http client. Logging is done to the provided logger
func (*Client) Get ¶
Get performs a GET request using the net/http client. Logging is done to the provided logger
Click to show internal directories.
Click to hide internal directories.