Versions in this module Expand all Collapse all v0 v0.0.1 Mar 14, 2022 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) *Request + func (cli *Request) FormPost(ctx context.Context, url, field, filename string, reader io.Reader, ...) error + func (cli *Request) FormPostWithFile(ctx context.Context, url, field, filename string, response interface{}) error + func (cli *Request) Get(ctx context.Context, url string, response interface{}) error + func (cli *Request) GetWithBody(ctx context.Context, url string) (*http.Response, error) + func (cli *Request) Post(ctx context.Context, url string, params interface{}, response interface{}) error + func (cli *Request) PostWithBody(ctx context.Context, url string, params interface{}) (*http.Response, error)