Documentation
¶
Index ¶
- type HTTPClient
- func (c *HTTPClient) Delete(ctx context.Context, path string) error
- func (c *HTTPClient) Get(ctx context.Context, path string, params map[string]string) ([]byte, error)
- func (c *HTTPClient) Post(ctx context.Context, path string, body interface{}) ([]byte, error)
- func (c *HTTPClient) Put(ctx context.Context, path string, body interface{}) ([]byte, error)
- func (c *HTTPClient) SetHeader(key, value string)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type HTTPClient ¶
type HTTPClient struct {
// contains filtered or unexported fields
}
HTTPClient HTTP client
func NewHTTPClient ¶
func NewHTTPClient(baseURL, authToken string) *HTTPClient
NewHTTPClient creates a new HTTP client
func (*HTTPClient) Delete ¶
func (c *HTTPClient) Delete(ctx context.Context, path string) error
Delete sends a DELETE request
func (*HTTPClient) Get ¶
func (c *HTTPClient) Get(ctx context.Context, path string, params map[string]string) ([]byte, error)
Get sends a GET request
func (*HTTPClient) SetHeader ¶
func (c *HTTPClient) SetHeader(key, value string)
SetHeader sets a custom header
Click to show internal directories.
Click to hide internal directories.