Versions in this module Expand all Collapse all v1 v1.16.2 Sep 23, 2026 Changes in this version + func Delete(result interface{}, urlStr string, opts ...Option) error + func Get(result interface{}, urlStr string, opts ...Option) error + func Patch(result interface{}, urlStr string, body interface{}, opts ...Option) error + func Post(result interface{}, urlStr string, body interface{}, opts ...Option) error + func Put(result interface{}, urlStr string, body interface{}, opts ...Option) error + type KV = map[string]interface + type Option func(*options) + func WithHeaders(headers map[string]string) Option + func WithParams(params map[string]interface{}) Option + func WithTimeout(t time.Duration) Option + type Request struct + func New() *Request + func (req *Request) CustomRequest(f func(req *http.Request, data *bytes.Buffer)) *Request + func (req *Request) DELETE() (*Response, error) + func (req *Request) Do(method string, data interface{}) (*Response, error) + func (req *Request) GET() (*Response, error) + func (req *Request) PATCH() (*Response, error) + func (req *Request) POST() (*Response, error) + func (req *Request) PUT() (*Response, error) + func (req *Request) Reset() + func (req *Request) Response() (*Response, error) + func (req *Request) SetBody(body interface{}) *Request + func (req *Request) SetContentType(a string) *Request + func (req *Request) SetHeader(k, v string) *Request + func (req *Request) SetHeaders(headers map[string]string) *Request + func (req *Request) SetParam(k string, v interface{}) *Request + func (req *Request) SetParams(params map[string]interface{}) *Request + func (req *Request) SetTimeout(t time.Duration) *Request + func (req *Request) SetURL(path string) *Request + type Response struct + func (resp *Response) BindJSON(v interface{}) error + func (resp *Response) BodyString() (string, error) + func (resp *Response) Error() error + func (resp *Response) ReadBody() ([]byte, error) + type StdResult struct + Code int + Data interface{} + Msg string