Versions in this module Expand all Collapse all v1 v1.3.2 Jun 27, 2023 v1.3.1 Jun 13, 2023 v1.3.0 Jun 13, 2023 Changes in this version type Request + func (req *Request[RES]) LogLevel(lvl client.LogLevel) *Request[RES] v1.2.8 Jun 6, 2023 v1.2.7 Jun 6, 2023 v1.2.6 Jun 2, 2023 v1.2.5 Jun 2, 2023 v1.2.3 Jun 2, 2023 v1.2.2 Jun 2, 2023 v1.2.0 May 30, 2023 v1.1.2 May 30, 2023 v1.1.1 May 30, 2023 v1.1.0 May 30, 2023 Changes in this version + func CommonResponse2() client.ResponseBodyCheck + type Option func(req *Request[RES]) *Request[RES] + type Request client.Request + func New() *Request[RES] + func NewByRequest(req *client.Request) *Request[RES] + func (r *Request[RES]) Do(req any) (*RES, error) + func (r *Request[RES]) Get(url string) (*RES, error) + func (r *Request[RES]) Post(url string, param any) (*RES, error) + func (req *Request[RES]) AddHeader(k, v string) *Request[RES] + func (req *Request[RES]) CachedHeader(key string) *Request[RES] + func (req *Request[RES]) ContentType(contentType client.ContentType) *Request[RES] + func (req *Request[RES]) DisableLog() *Request[RES] + func (req *Request[RES]) EnableLog() *Request[RES] + func (req *Request[RES]) Method(method string) *Request[RES] + func (req *Request[RES]) Origin() *client.Request + func (req *Request[RES]) ResponseHandler(handler func([]byte) ([]byte, error)) *Request[RES] + func (req *Request[RES]) RetryHandler(handle func(*client.Request)) *Request[RES] + func (req *Request[RES]) RetryTimes(retryTimes int) *Request[RES] + func (req *Request[RES]) SetHeader(header client.Header) *Request[RES] + func (req *Request[RES]) SetProxy(url string) *Request[RES] + func (req *Request[RES]) SetRequest(handle func(*client.Request)) *Request[RES] + func (req *Request[RES]) Timeout(timeout time.Duration) *Request[RES] + func (req *Request[RES]) Url(url string) *Request[RES] + func (req *Request[RES]) WithClient(c *http.Client) *Request[RES] + func (req *Request[RES]) WithLogger(logger client.LogCallback) *Request[RES] + type ResponseBody2 struct + Code int + Data RES + Msg string + func (res *ResponseBody2[RES]) CheckError() error + func (res *ResponseBody2[RES]) GetData() *RES + type ResponseInterface interface + GetData func() T v1.0.0 Mar 30, 2023 Changes in this version + func CommonResponse() client.ResponseBodyCheck + func CustomizeGet(setParams client.SetParams) func(url string) (*T, error) + func GetSubData(url string) (*T, error) + func SimpleGet(url string) (*RES, error) + type GetDataInterface interface + GetData func() *T + type RequestWrapper client.Request + func NewGetRequest(url string) *RequestWrapper[RES] + func NewRequest(url, method string) *RequestWrapper[RES] + func (r *RequestWrapper[RES]) Do(req any) (*RES, error) + func (r *RequestWrapper[RES]) Get(url string) (*RES, error) + func (r *RequestWrapper[RES]) Post(url string, param any) (*RES, error) + func (req *RequestWrapper[RES]) AddHeader(k, v string) *RequestWrapper[RES] + func (req *RequestWrapper[RES]) ContentType(contentType client.ContentType) *RequestWrapper[RES] + func (req *RequestWrapper[RES]) DisableLog() *RequestWrapper[RES] + func (req *RequestWrapper[RES]) ResponseHandler(handler func([]byte) ([]byte, error)) *RequestWrapper[RES] + func (req *RequestWrapper[RES]) RetryTimes(times int) *RequestWrapper[RES] + func (req *RequestWrapper[RES]) SetHeader(header client.Header) *RequestWrapper[RES] + func (req *RequestWrapper[RES]) SetLogger(logger client.LogCallback) *RequestWrapper[RES] + func (req *RequestWrapper[RES]) Timeout(timeout time.Duration) *RequestWrapper[RES] + func (req *RequestWrapper[RES]) WithClient(c *http.Client) *RequestWrapper[RES] + type ResponseBody struct + Data RES + Message string + Status int + func (res *ResponseBody[RES]) CheckError() error + type SetParams func(req *RequestWrapper[RES]) *RequestWrapper[RES] + type SubDataRequest RequestWrapper[RES] + func NewSubDataRequestParams(url, method string) *SubDataRequest[RES, T] + func (r *SubDataRequest[RES, T]) Do(req any) (*RES, error) + func (req *SubDataRequest[RES, T]) Get(url string) (*T, error) + func (req *SubDataRequest[RES, T]) Origin() *client.Request + func (req *SubDataRequest[RES, T]) OriginWrapper() *RequestWrapper[GetDataInterface[T]]