Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- async static void GetRequest(string url)
- {
- using (HttpClient _client = new HttpClient())
- {
- using (HttpResponseMessage response = await _client.GetAsync(url))
- {
- using (HttpContent content = response.Content)
- {
- string mycontent = await content.ReadAsStringAsync();
- Console.WriteLine(mycontent);
- }
- }
- }
- }
Add Comment
Please, Sign In to add comment