Documentation ¶
Index ¶
- func CallWithExponentialBackOff(url string, auth string, httpMethod string, reqBody []byte, ...) ([]byte, error)
- func GetBasicAuthUserAndPassword(auth string) (string, string)
- func GetClient() *http.Client
- func GetClientWithTimeout(duration time.Duration) *http.Client
- func GetCustomClient(transport http.RoundTripper, timeout int) *http.Client
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 GetClientWithTimeout ¶
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.
Click to show internal directories.
Click to hide internal directories.