C# how to create http request and receive variables?

C# how to create http request and receive variables? (do in the browser, see the screenshot). And need in the program. Also, I need display the values of request variables such as key, server, ts
April 7th 20 at 10:49
3 answers
April 7th 20 at 10:51
It's a pretty common task which is easy to Google.
April 7th 20 at 10:53
Uri address = new Uri("https://api.vk.com/blablabla");
ServicePointManager.ServerCertificateValidationCallback = delegate { return true; };
ServicePointManager.SecurityProtocol = SecurityProtocolType.Ssl3 | SecurityProtocolType.Tls | (SecurityProtocolType)(0xc0 | 0x300 | 0xc00);
WebClient client = new WebClient();
client.Encoding = System.Text.Encoding.UTF8;
String request = client.DownloadString(address);
YourObject myobject = JsonParser.deserialize(request);//because C# has no built-in methods of disassembly JSON here mysrv library functions.
YourObject is a class with the desired variables? What is JsonParser? - anahi73 commented on April 7th 20 at 10:56
@anahi73, reading books on C#. This is the basic thing. - nasir_Cassin commented on April 7th 20 at 10:59
April 7th 20 at 10:55
First open the Fox, put a checkbox in a continuous log. Use RestSharp or Xnet. since you will need cookies in vosproizvodit a series of queries leading to this result. for parsing you can use a Newtonsoft.Json

Find more questions by tags C#