Versions in this module Expand all Collapse all v1 v1.0.3 Nov 4, 2023 v1.0.2 Nov 4, 2023 Changes in this version + type HttpClient struct + func NewHttpClient(httpExecutor HttpExecutor, timeout time.Duration) *HttpClient + func NewRetryHttpClient(httpExecutor HttpExecutor, timeout time.Duration, retry uint64) *HttpClient + func (c *HttpClient) Do(ctx context.Context, method string) (*HttpResponse, error) + func (c *HttpClient) DoFormEncoding(ctx context.Context, method string) (*HttpResponse, error) + func (c *HttpClient) DoFormMultipart(ctx context.Context) (*HttpResponse, error) + func (c *HttpClient) URL() string + func (c *HttpClient) WithBasicAuth(username string, password string) *HttpClient + func (c *HttpClient) WithBearerAuth(token string, addPrefix bool) *HttpClient + func (c *HttpClient) WithCookies(cookies ...*http.Cookie) *HttpClient + func (c *HttpClient) WithHeaders(headers map[string]string) *HttpClient + func (c *HttpClient) WithPayload(params interface{}) *HttpClient + func (c *HttpClient) WithUrl(uri string, params map[string][]string) *HttpClient + type HttpExecutor interface + Execute func(r *http.Request, timeout time.Duration, retry uint64) (int, []byte, error) + WithPrometheusHttpConfig func(conf *u_prometheus.HttpConfig) HttpExecutor + func NewHttpExecutor() HttpExecutor + type HttpResponse struct + Code int + Payload []byte