Httpclient Getstringasync

[Solved] Httpclient Getstringasync | Vb - Code Explorer | yomemimo.com
Question : httpclient getstringasync

Answered by : mariano-montano

private static async string HttpGet(string uri)
        {
            var http = new HttpClient();
            http.BaseAddress = new Uri(uri);
            var res = await http.GetStringAsync("");
            return res;
        }

Source : https://www.csharpcodi.com/csharp-examples/System.Net.Http.HttpClient.GetStringAsync(string)/ | Last Update : Sat, 30 Apr 22

Question : httpclient getstringasync

Answered by : mariano-montano

private static string HttpGet(string uri)
{ var http = new HttpClient(); http.BaseAddress = new Uri(uri); var res = http.GetStringAsync("").Result; return res;
}

Source : https://www.csharpcodi.com/csharp-examples/System.Net.Http.HttpClient.GetStringAsync(string)/ | Last Update : Sat, 30 Apr 22

Answers related to httpclient getstringasync

Code Explorer Popular Question For Vb