correlati: how-do-i-use-webrequest-to-access-an-ssl-encrypted-site-using-httpscome inviare una richiesta HTTPS GET in C#
come inviare una richiesta HTTPS GET in C#?
correlati: how-do-i-use-webrequest-to-access-an-ssl-encrypted-site-using-httpscome inviare una richiesta HTTPS GET in C#
come inviare una richiesta HTTPS GET in C#?
Aggiungere ?var1=data1&var2=data2
alla fine dell'URL di presentare i valori alla pagina tramite GET:
using System.Net;
using System.IO;
string url = "https://www.example.com/scriptname.php?var1=hello";
HttpWebRequest request = (HttpWebRequest)WebRequest.Create(url);
HttpWebResponse response = (HttpWebResponse)request.GetResponse();
Stream resStream = response.GetResponseStream();
Io preferisco usare WebClient, sembra di gestire SSL in modo trasparente:
http://msdn.microsoft.com/en-us/library/system.net.webclient.aspx
Alcuni aiuto per la risoluzione dei problemi qui:
http://clipperhouse.com/blog/post/WebClient-Fiddler-and-SSL.aspx
Questo codice è stato testato con successo da chiunque? –
Funziona bene per me. –
Nota: questo funziona per HTTP, ho testato questo codice con l'URL HTTPS e non ha funzionato. Andando a provare WebClient e vedere se funziona con SSL – Pavdro