Documentation ¶
Index ¶
- func EncodeURL(api string, queries map[string]interface{}) (string, error)
- type CommonError
- type CommonResult
- type ContentType
- type 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)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type CommonError ¶
type CommonError struct { ErrCode int `json:"errcode"` // 错误码 ErrMSG string `json:"errmsg"` // 错误描述 }
CommonError 微信返回错误信息
func (CommonError) GetResponseError ¶
func (err CommonError) GetResponseError() error
GetResponseError 获取微信服务器错返回误信息
type CommonResult ¶
type CommonResult struct { ResultCode int `json:"resultcode"` // 错误码 ResultMsg string `json:"resultmsg"` // 错误描述 }
CommonResult 微信返回错误信息
func (CommonResult) GetResponseError ¶
func (err CommonResult) GetResponseError() error
GetResponseError 获取微信服务器错返回误信息
type ContentType ¶
type ContentType uint
消息返回数据类型
const ( ContentTypePlain ContentType = iota ContentTypeXML ContentTypeJSON )
func (ContentType) String ¶
func (ctp ContentType) String() string
type Request ¶
type Request struct {
// contains filtered or unexported fields
}
func NewRequest ¶
func (*Request) FormPostWithFile ¶
Click to show internal directories.
Click to hide internal directories.