All, I’m trying to get the list of supported google languages in a listbox.
When I open “https://www.googleapis.com/language/translate/v2/languages?key=mycodehere” in my web browser, I get the reply I need:
{
"data": {
"languages": [
{
"language": "af"
},
{
"language": "ar"
},
{
"language": "az"
}
]
}
}
there is more but I cut some languages out of this paste.
In XOJO I try to get this data in a JSON object.
Dim http As New HTTPSecureSocket
Dim key As String
key= "mycodehere"
http.SetRequestHeader("User-Agent","Mozilla/5.0 (Macintosh; Intel Mac OS X 10.9; rv:32.0) Gecko/20100101 Firefox/32.0")
Dim socket1 As New HTTPSocket
Dim jsonData As String = socket1.Get("https://www.googleapis.com/language/translate/v2/languages?key="+key, 30)
In my debug window I see jsonData contains this:
{“error”:{“errors”:[{“domain”:“global”,“reason”:“sslRequired”,“message”:“SSL is required to perform this operation.”}],“code”:403,“message”:“SSL is required to perform this operation.”}}
Could someone help me to understand what is wrong?
thanks
gert