Quantcast
Channel: Appcelerator Developer Center Q&A Unanswered Questions 20
Viewing all articles
Browse latest Browse all 8068

Titanium HTTPClient Post no longer works on Titanium SDK 3.3.0.GA for Android and iOS

$
0
0

Application type: mobile Connecting to ACS Titanium / SDK: 3.3.0.GA / Platform & version: iOS 7.1 / Device: iOS iPhone Retina simulator, iPhone 4S, iPhone 5, Android 4.4 / GenyMotion Samsung S3 Simulator / Host Operating System: OSX 10.9.4 / Titanium Studio: 3.3.0.201407100905

In my mobile App, I perform a HTTP Post, where I send a JavaScript Array as a string value. This has been working fine on iOS, until I upgraded to Titanium SDK 3.3.0.GA. Now I just get timeouts with no descriptive error.

The same issue is occurring on Android, but it's important to note that this issue occurs on Android prior to Titanium SDK 3.3.0.GA. I only started porting my application to Android hence why I'm discovering this now.

I would've been happy to move back to the 3.2.3.GA SDK, but as I said, it doesn't solve the issue on Android.

Below is an example of the code that I am running:

var xhr = Titanium.Network.createHTTPClient();
xhr.tlsVersion = Titanium.Network.TLS_VERSION_1_1;
 
xhr.onload = function() {
    var jsonObject = JSON.parse(this.responseText);
};
 
xhr.onerror = function(e) {
    Ti.API.info(JSON.stringify(e));
};
 
xhr.open("POST", URL);
xhr.send(JSON.stringify(["ArrayVal1"]));
Remember, this worked perfectly for iOS prior to SDK 3.3.0.GA, but doesn't work on Android irrelevant of SDK.

Viewing all articles
Browse latest Browse all 8068

Trending Articles