Answers for "httpclient getstringasync"

C#
0

httpclient getstringasync

private static string HttpGet(string uri)
{
  var http = new HttpClient();
  http.BaseAddress = new Uri(uri);
  var res = http.GetStringAsync("").Result;
  return res;
}
Posted by: Guest on April-23-2022
0

httpclient getstringasync

private static async string HttpGet(string uri)
        {
            var http = new HttpClient();
            http.BaseAddress = new Uri(uri);
            var res = await http.GetStringAsync("");
            return res;
        }
Posted by: Guest on April-23-2022

Code answers related to "httpclient getstringasync"

C# Answers by Framework

Browse Popular Code Answers by Language