Many languages can use code to make Web requests and get the data they need.
Make it easy to call someone else's interface and handle it yourself.
HttpWebRequest request = webrequest.create (URL) as HttpWebRequest;
Request. Method = "GET";
Request. ContentType = "Application/json; Charset=utf-8 ";
Sometimes this parameter is required to restrict the browser
Request. useragent = "mozilla/5.0 (Windows NT 6.1; WOW64; rv:30.0) gecko/20100101 firefox/30.0 ";
HttpWebResponse response = Request. GetResponse () as HttpWebResponse;
Stream Myresponsestream = Response. GetResponseStream ();
StreamReader Mystreamreader = new StreamReader (Myresponsestream, Encoding.UTF8);
string result = Mystreamreader.readtoend ();
Results are the result and can be handled on your own.
If there is a problem, you can directly enter the address directly in the browser, you can view the normal and parameter settings, and then change your own code.
Experience Summary 20--c# mock Web request