Documentation ¶
Overview ¶
Package httpretry implements methods for http requests which are repeated in case of errors.
Index ¶
- func Delete(client *http.Client, url string, body io.Reader, delay time.Duration, ...) (httpStatus int, err error)
- func Get(client *http.Client, url string, delay time.Duration, numRetries int) (body []byte, httpStatus int, err error)
- func Post(client *http.Client, url string, contentType string, content []byte, ...) (body []byte, httpStatus int, err error)
- func Put(client *http.Client, url string, content []byte, delay time.Duration, ...) (body []byte, httpStatus int, err error)
- func Request(req *http.Request, numRetries int, delay time.Duration) (resp *http.Response, err error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Delete ¶
func Delete(client *http.Client, url string, body io.Reader, delay time.Duration, numRetries int) (httpStatus int, err error)
Delete sends a delete request and retries in case of an error
func Get ¶
func Get(client *http.Client, url string, delay time.Duration, numRetries int) (body []byte, httpStatus int, err error)
Get sends a get request and retries in case of an error
func Post ¶
func Post(client *http.Client, url string, contentType string, content []byte, delay time.Duration, numRetries int) (body []byte, httpStatus int, err error)
Post sends a post request and retries in case of an error
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.