Versions in this module Expand all Collapse all v0 v0.0.1 Aug 31, 2021 Changes in this version + const ErrDefault + const ErrRedirectPolicy + const ErrTimeout + const OPT_AFTER_REQUEST_FUNC + const OPT_AUTOREFERER + const OPT_BEFORE_REQUEST_FUNC + const OPT_CONNECTTIMEOUT + const OPT_CONNECTTIMEOUT_MS + const OPT_CONTEXT + const OPT_COOKIEJAR + const OPT_DEBUG + const OPT_FOLLOWLOCATION + const OPT_INTERFACE + const OPT_MAXREDIRS + const OPT_PROXY + const OPT_PROXYTYPE + const OPT_PROXY_FUNC + const OPT_REDIRECT_POLICY + const OPT_REFERER + const OPT_TIMEOUT + const OPT_TIMEOUT_MS + const OPT_UNSAFE_TLS + const OPT_USERAGENT + const PROXY_HTTP + const PROXY_SOCKS4 + const PROXY_SOCKS4A + const PROXY_SOCKS5 + const USERAGENT + var Begin = defaultClient.Begin + var CONST = map[string]int + var Delete = defaultClient.Delete + var Do = defaultClient.Do + var Get = defaultClient.Get + var Head = defaultClient.Head + var Post = defaultClient.Post + var PostJson = defaultClient.PostJson + var PostMultipart = defaultClient.PostMultipart + var Put = defaultClient.Put + var PutJson = defaultClient.PutJson + var WithCommonHeader = defaultClient.WithCommonHeader + var WithHeader = defaultClient.WithHeader + var WithHeaders = defaultClient.WithHeaders + var WithOption = defaultClient.WithOption + var WithOptions = defaultClient.WithOptions + var WithTrace = defaultClient.WithTrace + func IsNil(obj interface{}) bool + func IsRedirectError(err error) bool + func IsTimeoutError(err error) bool + func Md5(s string) string + func Option(o map[string]interface{}) map[int]interface + type Error struct + Code int + Message string + func (err Error) Error() string + type HttpClient struct + Headers map[string]string + Span zipkin.Span + SpanContextKey string + func NewHttpClient() *HttpClient + func (client *HttpClient) Begin() *HttpClient + func (client *HttpClient) Defaults(defaults Map) *HttpClient + func (client *HttpClient) Delete(url string, params ...interface{}) (*Response, error) + func (client *HttpClient) Do(method string, url string, headers map[string]string, body io.Reader) (*Response, error) + func (client *HttpClient) Get(url string, params ...interface{}) (*Response, error) + func (client *HttpClient) Head(url string) (*Response, error) + func (client *HttpClient) Post(url string, params interface{}) (*Response, error) + func (client *HttpClient) PostJson(url string, data interface{}) (*Response, error) + func (client *HttpClient) PostMultipart(url string, params interface{}) (*Response, error) + func (client *HttpClient) Put(url string, body io.Reader) (*Response, error) + func (client *HttpClient) PutJson(url string, data interface{}) (*Response, error) + func (client *HttpClient) WithCommonHeader(appName, appSecretKey string) *HttpClient + func (client *HttpClient) WithHeader(k string, v string) *HttpClient + func (client *HttpClient) WithHeaders(m map[string]string) *HttpClient + func (client *HttpClient) WithOption(k int, v interface{}) *HttpClient + func (client *HttpClient) WithOptions(m Map) *HttpClient + func (client *HttpClient) WithTrace(ctx interface{}, spanContextKey, name string, trace *zipkin.Tracer) *HttpClient + type Map map[interface{}]interface + type Response struct + func (client *Response) ReadAll() ([]byte, error) + func (client *Response) ToString() (string, error)