httphelpers

package
v3.9.0 Latest Latest
Warning

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

Go to latest
Published: Nov 4, 2024 License: Apache-2.0 Imports: 12 Imported by: 6

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CallWithExponentialBackOff

func CallWithExponentialBackOff(url string, auth string, httpMethod string, reqBody []byte, reqParams url.Values) ([]byte, error)

CallWithExponentialBackOff make a http call with exponential backoff retry

func GetBasicAuthUserAndPassword

func GetBasicAuthUserAndPassword(auth string) (string, string)

func GetClient

func GetClient() *http.Client

GetClient returns a Client reference with our default configuration

func GetClientWithTimeout

func GetClientWithTimeout(duration time.Duration) *http.Client

GetClientWithTimeout returns a client with JX default transport and user specified timeout

func GetCustomClient

func GetCustomClient(transport http.RoundTripper, timeout int) *http.Client

GetCustomClient returns a client with user specified transport and timeout (in seconds)

Types

This section is empty.

Jump to

Keyboard shortcuts

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