Versions in this module Expand all Collapse all v3 v3.6.4 Dec 3, 2021 v3.6.3 Dec 3, 2021 Changes in this version + func EncodeURL(api string, queries map[string]interface{}) (string, error) + type CommonError struct + ErrCode int + ErrMSG string + func (err CommonError) GetResponseError() error + type CommonResult struct + ResultCode int + ResultMsg string + func (err CommonResult) GetResponseError() error + type ContentType uint + const ContentTypeJSON + const ContentTypePlain + const ContentTypeXML + func (ctp ContentType) String() string + type Request struct + func NewRequest(http *http.Client, ctp ContentType, logger func() logger.Logger) *Request + func (cli *Request) FormPost(url, field, filename string, reader io.Reader, response interface{}) error + func (cli *Request) FormPostWithFile(url, field, filename string, response interface{}) error + func (cli *Request) Get(url string, response interface{}) error + func (cli *Request) GetWithBody(url string) (*http.Response, error) + func (cli *Request) Post(url string, params interface{}, response interface{}) error + func (cli *Request) PostWithBody(url string, params interface{}) (*http.Response, error)