1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25
| Public Function Etouai() As String
ServicePointManager.ServerCertificateValidationCallback = (Function(sender, certificate, chain, sslPolicyErrors) True)
' Création de la requête
Dim retour As String
Dim service As String
service = "https://cas01.clb.loc:8443/cas/login?service=http://172.16.0.57/Identification_WS/IDENTIFICATION_CAS_UNITY/Bidon.aspx&username=reperret&password=bblablablablabla&auto=true"
Dim objWebRequest As WebRequest = HttpWebRequest.Create(service)
Dim objWebResponse As WebResponse = objWebRequest.GetResponse()
Dim objStreamReader As System.IO.StreamReader = Nothing
Try
objStreamReader = New StreamReader(objWebResponse.GetResponseStream())
retour = objStreamReader.ReadToEnd()
Finally
If Not objWebResponse Is Nothing Then
objWebResponse.Close()
End If
End Try
Return retour.ToString()
End Function |
Partager