Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Requests ¶
type Requests struct { Logger hclog.Logger Client *http.Client Retryable RetryableRequest }
func NewRetryableDefault ¶
func (Requests) Do ¶
func (opts Requests) Do(ctx context.Context, reqDef *http.Request) (resp *http.Response, logErrorWithRequest func(error) error, rerr error)
Do makes an http request. It preserves both request and response body for logging purposes. Returns logError function that logs the passed error together with request and response body for easier debugging.
Click to show internal directories.
Click to hide internal directories.