Skip to content

Instantly share code, notes, and snippets.

@jonathanpeppers
Created February 3, 2017 20:23
Show Gist options
  • Save jonathanpeppers/f597b44d869d287b4996617a254cc142 to your computer and use it in GitHub Desktop.
Save jonathanpeppers/f597b44d869d287b4996617a254cc142 to your computer and use it in GitHub Desktop.
HttpClient Example
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
});
@ahmedalejo
Copy link

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment