Quantcast
Channel: Xamarin.Forms — Xamarin Community Forums
Viewing all articles
Browse latest Browse all 58056

Why Xamarin not supports HttpClient?

$
0
0

private string GetHtmlCode(string url)
        {
            var httpClient = new HttpClient();
            var httpResponseMessage = httpClient.GetAsync(url).Result;         
            Stream res = httpResponseMessage.Content.ReadAsStreamAsync().Result;
            //Запись в поток
            StreamReader reader = new StreamReader(res, Encoding.UTF8);
            return reader.ReadToEnd();
        }

using System.Net.Http - no


Viewing all articles
Browse latest Browse all 58056

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>