Versions in this module Expand all Collapse all v1 v1.0.0 Feb 26, 2021 Changes in this version + var DefaultClient = &http.Client + var DefaultErrorHandler = func(res *http.Response, uri string) error + func GetBody(body interface{}) (buf io.ReadWriter, err error) + type Request struct + BaseURL string + ErrorHandler func(res *http.Response, uri string) error + HTTPClient *http.Client + Headers map[string]string + func InitClient(baseURL string) Request + func InitJSONClient(baseURL string) Request + func (r *Request) Execute(ctx context.Context, method string, url string, body io.Reader, ...) error + func (r *Request) Get(result interface{}, path string, query url.Values) error + func (r *Request) GetBase(path string) string + func (r *Request) GetWithCache(result interface{}, path string, query url.Values, cache time.Duration) error + func (r *Request) GetWithContext(ctx context.Context, result interface{}, path string, query url.Values) error + func (r *Request) Post(result interface{}, path string, body interface{}) error + func (r *Request) PostWithCache(result interface{}, path string, body interface{}, cache time.Duration) error + func (r *Request) PostWithContext(ctx context.Context, result interface{}, path string, body interface{}) error + func (r *Request) SetTimeout(seconds time.Duration)