基于C#的汇率接口调用代码实例
代码描述:基于C#的汇率接口调用代码实例
代码平台:聚合数据
using System;
using ;
using ;
using ;
using ;
using ;
using ;
using ;
using ;
//----------------------------------
// 汇率调用示例代码- 聚合数据
// 在线接口文档:s/80
// 代码中JsonObject类下载地址:http://download./download/gcm3206021155665/7458439
//----------------------------------
namespace ConsoleAPI
{
class Program
{
static void Main(string[] args)
{
string appkey = "*******************"; //配置您申请的appkey
//
string url1 = "http://op./onebox/exchange/query";
var parameters1 = new Dictionary<string, string>();
("key", appkey);//你申请的key
string result1 = sendPost(url1, parameters1, "get");
JsonObject newObj1 = new JsonObject(result1);
String errorCode1 = newObj1["error_code"].Value;
if (errorCode1 == "0")
{
("成功");
(newObj1);
}
else
{
//("失败");
(newObj1["error_code"].Value+":"+newObj1["reason"].Value);
}
//
string url2 = "http:/
基于c#的汇率接口调用代码实例 来自淘豆网m.daumloan.com转载请标明出处.