httpretry

package
v0.0.0-...-a556200 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 18, 2021 License: Apache-2.0, MIT, Apache-2.0, + 1 more Imports: 6 Imported by: 0

Documentation

Overview

Package httpretry implements methods for http requests which are repeated in case of errors.

Index

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

func Put

func Put(client *http.Client, url string, content []byte, delay time.Duration,
	numRetries int) (body []byte, httpStatus int, err error)

Put sends a post request and retries in case of an error

func Request

func Request(req *http.Request, numRetries int, delay time.Duration) (resp *http.Response,
	err error)

Request sends a http request and retries in case of an error

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL