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

HttpClient doesn't work with Https

$
0
0

Hi, I have this code in my PCL app that cause me a problem:

using System.Net.Http;
using ModernHttpClient;

...

HttpClient httpClient = new HttpClient(new NativeMessageHandler());
string json = await httpClient.GetStringAsync("my_url_here");

This code work great with Http, but when I try with Https it crash with this message an unhandled exception occurred.
I pass all day yesterday searching for this and I always find that with ModernHttpClient is the right way for Https but it doesn't work for me.
I also set (in Android Manifest):
HttpClient Implementation = Android
SSL/TLS Implementation = TLS 1.2+ native

Anyone can help me?


Viewing all articles
Browse latest Browse all 77050

Trending Articles