ITopClient client = new DefaultTopClient("http://gw.api.taobao.com/router/rest", "appkey", "appsecret", "json");
TimeGetRequest req = new TimeGetRequest();
TimeGetResponse rsp = client.Execute(req);
Console.WriteLine(rsp.Body);
String url = new String("http://gw.api.taobao.com/router/rest");
ITopClient client = new DefaultTopClient(url, appkey, secret);
AliexpressLogisticsRedefiningListlogisticsserviceRequest req = new AliexpressLogisticsRedefiningListlogisticsserviceRequest();
AliexpressLogisticsRedefiningListlogisticsserviceResponse rsp = client.Execute(req, sessionKey);
Console.WriteLine(rsp.Body);
The following table lists API service URLs.
| Environment | HTTP Request URL | HTTPS Request URL |
|---|---|---|
| Formal environment | http://gw.api.taobao.com/router/rest | https://eco.taobao.com/router/rest |
| Overseas formal environment | http://api.taobao.com/router/rest | https://api.taobao.com/router/rest |
DefaultTopClient.SetDisableParser(true)
DefaultTopClient.SetUseSimplifyJson(true)
DefaultTopClient.SetDisableTrace(true)
DefaultTopClient.SetIgnoreSSLCheck(true)
DefaultTopClient.SetUseGzipEncoding(false)
//Default timeout interval for a response to an HTTP request: 20s DefaultTopClient.SetTimeout(20000L) //Default timeout interval for HTTP data read completion: 60s DefaultTopClient.SetReadWriteTimeout(60000L)
DefaultTopLogger.FilePath = "c:/tmp/topsdk.log";
AutoRetryTopClient client = new AutoRetryTopClient("http://gw.api.taobao.com/router/rest", "appkey", "appsecret", "json");
client.SetMaxRetryCount(3);
client.SetRetryWaitTime(100L);
TimeGetRequest request = new TimeGetRequest();
TimeGetResponse response = client.Execute(request);
if (!response.IsError) {
Console.WriteLine(response.Body);
}
ClusterTopClient client = new ClusterTopClient("http://gw.api.taobao.com/router/rest", "appkey", "appsecret", "json");
TimeGetRequest request = new TimeGetRequest();
TimeGetResponse response = client.Execute(request);
Console.WriteLine(response.Body);