C#:
using System;
using System.Net;
using System.Web;
class CSharpExample
{
public static void Main(string[] args)
{
try
{
Console.WriteLine(makeAPICall());
}
catch (WebException e)
{
Console.WriteLine(e.Message);
}
}
static string makeAPICall()
{
var URL = new UriBuilder("https://fxhapi.feixiaohao.com/public/v1/ticker");
var queryString = System.Web.HttpUtility.ParseQueryString(string.Empty);
queryString["start"] = "5";
queryString["limit"] = "5";
queryString["convert"] = "USD";
URL.Query = queryString.ToString();
var client = new System.Net.WebClient();
client.Headers.Add("Accepts", "application/json");
return client.DownloadString(URL.ToString());
}
}
如果文章或资源对您有帮助,欢迎打赏作者。一路走来,感谢有您!
txttool.com 说一段 esp56物联 查询128 IP查询