Hey,
i am using Kinvey as a backend and trying to make a "normal" http call to them:
var xhr = Ti.Network.createHTTPClient({ onload: function(e) { console.log(this.responseText); alert('success'); }, onerror: function(e) { // this function is called when an error occurs, including a timeout console.log(e); alert('error'); }, }); xhr.open("POST", Kinvey.API_ENDPOINT + '/push/kid_XXXXXXX/register-device'); xhr.setRequestHeader('Authorization', 'Kinvey ' + Kinvey.getActiveUser()._kmd.authtoken); xhr.setRequestHeader('Content-Type', 'application/json'); console.log("Token: " + token); xhr.send({ 'platform' : 'ios', 'deviceId' : token });
I don't know why, but since the newest SDK this results in a http error - regardless what i am trying to do. I saw in the release notes that something was changed at the http and ssl stuff in titanium.
But i can't figure out what - Does anybody know if i have to adjust something to get this work? (The url is a secured connection of course)
If i paste the url in the browser everything is fine - so i think it's a titanium problem.
Help would be really great.
Best, Nico
( iOS, SDK 3.3.0 RC)