Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CheckErr ¶
CheckErr : Helper function for tests. Check if a given error was expected.
params :- a. desc string Description of the error in case of failure b. isError bool Whether the error was expected or not c. err error Error to check
returns :- a. error Error if any
func GetRequest ¶
GetRequest : Make a GET request to the given URL. Uses exponential retries with backoff.
params :- a. url string URL to make the request to b. retryDuration time.Duration Duration to wait between retries
returns :- a. http.Response Response from the request b. error Error if any
func PostRequest ¶
func PostRequest(url, contentType string, body io.Reader, retry bool, retryDuration time.Duration) (*http.Response, error)
PostRequest : Make a POST request to the given URL. Uses exponential retries with backoff optionally.
params :- a. url string URL to make the request to b. retry bool True if retries should be done c. retryDuration time.Duration Duration to wait between retries
returns :- a. http.Response Response from the request b. error Error if any
Types ¶
This section is empty.