Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Retry ¶
func Retry(doFunc func() error, opts ...RetryOption) error
Retry retries the func until it returns no error or reaches attempts limit or timed out, either one is earlier
Types ¶
type HTTPClient ¶
type HTTPClient struct {
// contains filtered or unexported fields
}
HTTPClient is a wrap of http.Client
func NewHTTPClient ¶
func NewHTTPClient(timeout time.Duration, tlsConfig *tls.Config) *HTTPClient
NewHTTPClient returns a new HTTP client with timeout and HTTPS support
func (*HTTPClient) Delete ¶
Delete send a DELETE request to the url and returns the response and status code.
Click to show internal directories.
Click to hide internal directories.