Advertisement

通过Unity获取Web数据

阅读量:

Unity获取Web数据

WebClient client = new WebClient();

client.Encoding = Encoding.UTF8;
var address = "http://api.xianyuqp.cn/UserPlayRecord.ashx?userid=1&kindid=300"";

string historyData = client.DownloadString(address);

Unity下载Web资源

  1. public void OperDownloadFile(string Url)

  2. {

  3. WebClient _client = new WebClient();

  4. //下载之后的文件名字

  5. string Path = Server.MapPath("1.mp3");

  6. _client.DownloadFile(Url, Path);

  7. }

Unity向Web发送信息

复制代码
 System.Collections.Specialized.NameValueCollection myPostPara = new System.Collections.Spec

全部评论 (0)

还没有任何评论哟~