Versions in this module Expand all Collapse all v1 v1.0.7 Jun 6, 2022 Changes in this version + var DefaultClient = NewClient() + type FormFile string + type GetOrDeleteExecutor struct + func (r *GetOrDeleteExecutor) AddHeader(name string, value interface{}) *GetOrDeleteExecutor + func (r *GetOrDeleteExecutor) AddParameter(name string, value interface{}) *GetOrDeleteExecutor + func (r *GetOrDeleteExecutor) AddParameters(values H) *GetOrDeleteExecutor + func (r *GetOrDeleteExecutor) AddRetryConditionFunc(_retryCondition RetryConditionFunc) *GetOrDeleteExecutor + func (r *GetOrDeleteExecutor) Do() (*http.Response, error) + func (r *GetOrDeleteExecutor) DoForEntity() (*RespondEntity, error) + func (r *GetOrDeleteExecutor) DoForString() (string, error) + func (r *GetOrDeleteExecutor) SetExpectStatus(expect int) *GetOrDeleteExecutor + func (r *GetOrDeleteExecutor) SetHeaders(values H) *GetOrDeleteExecutor + func (r *GetOrDeleteExecutor) SetRetryCount(_retryCount int) *GetOrDeleteExecutor + func (r *GetOrDeleteExecutor) SetRetryInterval(_retryInterval int) *GetOrDeleteExecutor + type H map[string]interface + type HttpClient struct + func NewClient() *HttpClient + func (c *HttpClient) AddHeader(key string, val string) *HttpClient + func (c *HttpClient) AddHeaders(values H) *HttpClient + func (c *HttpClient) AddRetryConditionFunc(retryCondition RetryConditionFunc) *HttpClient + func (c *HttpClient) DELETE(url string) *GetOrDeleteExecutor + func (c *HttpClient) GET(url string) *GetOrDeleteExecutor + func (c *HttpClient) GetRetryCount() int + func (c *HttpClient) GetRetryInterval() int + func (c *HttpClient) GetTimeout() int + func (c *HttpClient) POST(url string) *PostOrPutExecutor + func (c *HttpClient) PUT(url string) *PostOrPutExecutor + func (c *HttpClient) SetLogger(logger *zap.Logger) + func (c *HttpClient) SetRetryCount(retryCount int) *HttpClient + func (c *HttpClient) SetRetryInterval(retryInterval int) *HttpClient + func (c *HttpClient) SetTimeout(timeout int) *HttpClient + func (c *HttpClient) SetTransport(transport http.RoundTripper) *HttpClient + type PostOrPutExecutor struct + func (r *PostOrPutExecutor) AddHeader(name string, value interface{}) *PostOrPutExecutor + func (r *PostOrPutExecutor) AddRetryConditionFunc(_retryCondition RetryConditionFunc) *PostOrPutExecutor + func (r *PostOrPutExecutor) Do() (*http.Response, error) + func (r *PostOrPutExecutor) DoForEntity() (*RespondEntity, error) + func (r *PostOrPutExecutor) DoForString() (string, error) + func (r *PostOrPutExecutor) SetBodyAsForm(body H) *PostOrPutExecutor + func (r *PostOrPutExecutor) SetBodyAsJson(body interface{}) *PostOrPutExecutor + func (r *PostOrPutExecutor) SetExpectStatus(expect int) *PostOrPutExecutor + func (r *PostOrPutExecutor) SetHeaders(values H) *PostOrPutExecutor + func (r *PostOrPutExecutor) SetRetryCount(_retryCount int) *PostOrPutExecutor + func (r *PostOrPutExecutor) SetRetryInterval(_retryInterval int) *PostOrPutExecutor + type RespondEntity struct + func (t *RespondEntity) Data() []byte + func (t *RespondEntity) DataAsString() string + func (t *RespondEntity) StatusCode() int + func (t *RespondEntity) StatusText() string + func (t *RespondEntity) Unmarshal(entity interface{}) error + type RetryConditionFunc func(*http.Response) bool