Documentation ¶
Index ¶
Constants ¶
View Source
const ( // 正式的http请求接口 ProHTTPGateWayURL string = "http://gw.api.taobao.com/router/rest" // 沙箱http请求接口 DebugHTTPGateWayURL string = "http://gw.api.tbsandbox.com/router/rest" // 正式的https请求接口 ProHTTPSGateWayURL string = "https://eco.taobao.com/router/rest" // 沙箱的https请求接口 DebugHTTPSGateWayURL string = "https://gw.api.tbsandbox.com/router/rest" )
View Source
const ( ParamsMissError = -1 NewRequestError = -2 ClientDoError = -3 HTTPStatusCodeError = -4 )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct { // 是否是调试环境,调试环境,调用沙箱环境 Debug bool // 是否调用https请求 HTTPS bool // TOP分配给应用的AppKey AppKey string // AppSecret AppSecret string // 请求的地址 GateWayURL string // 响应格式。接口不传默认为xml格式,可选值:xml,json。 // 本sdk默认为json格式 Format string // API协议版本, // 默认:2.0。 ApiVersion string // contains filtered or unexported fields }
Client 是为了可以同时支持多个appkey,可以通过多个client完成请求
func DefaultClient ¶
DefaultClient 生成一个默认的client
type ErrorResponse ¶
type Response ¶
type Response struct {
Res ErrorResponse `json:"error_response"`
}
Click to show internal directories.
Click to hide internal directories.