首页 > 代码库 > 车辆违章查询演示代码

车辆违章查询演示代码

车辆违章查询演示代码

using System;

using System.Collections.Generic;

using System.Linq;

using System.Net;

using System.Text;

using System.Threading.Tasks;

namespace ConsoleApplication1 {    

class Program     {        

static void Main(string[] args)         {            

string key = "a95fd827a3a94a9fb2e9c13a79858b6e";                      

string url = "http://apis.haoservice.com/weizhang/citys?&key=" + key;            

WebClient wc = new WebClient();            

wc.Encoding = System.Text.Encoding.UTF8;            

string str = wc.DownloadString(url);

Console.WriteLine(str);

 Console.ReadKey();
        }
    }
}

 

车辆违章查询演示代码