Versions in this module Expand all Collapse all v1 v1.0.1 May 30, 2022 v1.0.0 May 31, 2022 Changes in this version + const DefaultCateName + const LangHeaderKey + const MaxOkStatus + func GetRioSign(token string) (timestamp string, signature string) + func Init(cateName string) error + func StripPassword(u *url.URL) string + type HTTPAgent struct + URL *url.URL + func New() *HTTPAgent + func NewWithContext(ctx xcontext.XContext) *HTTPAgent + func (h *HTTPAgent) AddHeader(name, value string) *HTTPAgent + func (h *HTTPAgent) AddHeaders(headers map[string]string) *HTTPAgent + func (h *HTTPAgent) AddQueries(queries map[string]string) *HTTPAgent + func (h *HTTPAgent) AddQuery(name, value string) *HTTPAgent + func (h *HTTPAgent) ClearQuery(name string) *HTTPAgent + func (h *HTTPAgent) Delete(rawurl string) *HTTPAgent + func (h *HTTPAgent) Get(rawurl string) *HTTPAgent + func (h *HTTPAgent) IgnoreErrorOnFailureStatusCode() *HTTPAgent + func (h *HTTPAgent) Method(method string) *HTTPAgent + func (h *HTTPAgent) Post(rawurl string) *HTTPAgent + func (h *HTTPAgent) Put(rawurl string) *HTTPAgent + func (h *HTTPAgent) Request() (res *Res, err error) + func (h *HTTPAgent) RequestAsync(cb func(*Res, error)) + func (h *HTTPAgent) ReturnResponseOnFailureStatusCode() *HTTPAgent + func (h *HTTPAgent) SetBodyBuffer(body *bytes.Buffer) *HTTPAgent + func (h *HTTPAgent) SetBodyBytes(body []byte) *HTTPAgent + func (h *HTTPAgent) SetBodyString(body string) *HTTPAgent + func (h *HTTPAgent) SetHeader(name, value string) *HTTPAgent + func (h *HTTPAgent) SetHeaders(headers map[string]string) *HTTPAgent + func (h *HTTPAgent) SetInsecureSkipVerify(skip bool) *HTTPAgent + func (h *HTTPAgent) SetQueries(queries map[string]string) *HTTPAgent + func (h *HTTPAgent) SetQuery(name, value string) *HTTPAgent + func (h *HTTPAgent) SetRioToken(token string) *HTTPAgent + func (h *HTTPAgent) SetTraceID(traceID string) *HTTPAgent + func (h *HTTPAgent) Timeout(timeoutInMs int) *HTTPAgent + func (h *HTTPAgent) Url(rawurl string) *HTTPAgent + func (h *HTTPAgent) WithContext(ctx xcontext.XContext) *HTTPAgent + type RequestCallback func(args RequestCallbackArgs) + var RequestCallbackHandler RequestCallback + type RequestCallbackArgs struct + Elapsed time.Duration + Err error + Req *http.Request + Res *Res + type Res struct + Body *bytes.Buffer + Headers http.Header + StatusCode int + func (r *Res) Content() string + type StatusError struct + func (e *StatusError) Error() string