Created
February 3, 2017 20:23
-
-
Save jonathanpeppers/f597b44d869d287b4996617a254cc142 to your computer and use it in GitHub Desktop.
HttpClient Example
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var httpClient = new HttpClient(); | |
string text = await httpClient.GetStringAsync("http://chucknorris.com/"); | |
//NOTE: you can't do this, or you will not get an automatic NSUrlSessionHandler | |
var httpClient = new HttpClient(new HttpClientHandler | |
{ | |
//Some settings | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hi there, as of Mono 4.8 this is necessarily correct.
You should update your related blog post
http://jonathanpeppers.com/Blog/improving-http-performance-in-xamarin-applications
which by the way is very useful