Versions in this module Expand all Collapse all v1 v1.0.1 Feb 8, 2024 v1.0.0 Feb 8, 2024 Changes in this version + func Delete(result interface{}, urlStr string, params ...KV) error + func Get(result interface{}, urlStr string, params ...KV) error + func Patch(result interface{}, urlStr string, body interface{}) error + func Post(result interface{}, urlStr string, body interface{}) error + func Put(result interface{}, urlStr string, body interface{}) error + type KV map[string]interface + type Request struct + 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 string) *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) SetJSONBody(body interface{}) *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