Quantcast
Channel: Recent Threads — Xamarin Community Forums
Viewing all articles
Browse latest Browse all 204402

Https Request

$
0
0

Hello everyone,
I want to do a easy Https request.
I've searched a long time in the internet and found code like this:
ServicePointManager.SecurityProtocol = SecurityProtocolType.Tls12;
But this code isnt working...
I have crated an easy http request, which works very good:

            HttpWebRequest request = (HttpWebRequest)WebRequest.Create(address);

            using (HttpWebResponse response = (HttpWebResponse)request.GetResponse())
            {
                var encoding = Encoding.GetEncoding(response.CharacterSet);

                using (Stream responseStream = response.GetResponseStream())
                using (StreamReader reader = new StreamReader(responseStream, encoding))
                    return reader.ReadToEnd();
             }

But i need an Https Request. So how can I do that?
Thank you!


Viewing all articles
Browse latest Browse all 204402

Trending Articles



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