I’m using a HTTPSecureSocket to access an API over HTTPS. I built a method to return data:
Dim socket1 As New HTTPSecureSocket
Dim dicReturn as New Dictionary
socket1.Yield = True
if data <> nil then
socket1.SetRequestContent(data.ToString, "application/json")
end if
dicReturn.Value("data") = socket1.SendRequest(method, app.CLOUD_API_URL+url, 5)
dicReturn.Value("status") = socket1.HTTPStatusCode
socket1.Close
return dicReturn
The code returns a status code of 0, with an empty return value instantly. If I do the request over HTTP, it works. I have tested it over HTTPS with a REST test client and it works.
I also created an event handler for all HTTPSecureSocket events, and nothing is triggered.
I just got bit with that this morning. THANK YOU Xojo forums for this little tidbit of information! And especially, thank you Anthony! You saved my bacon.
My GoogleApi class uses the default SSLv21 but fails when I tried changing it to TLSv1. Do I have to worry about Google turning off support for this and not having a protocol that will work?