[TIMOB-19347] Windows: Ti.Network.HTTPClient.send fails when arg object has non-string/Blob values
GitHub Issue | n/a |
---|---|
Type | Bug |
Priority | High |
Status | Closed |
Resolution | Fixed |
Resolution Date | 2015-08-18T23:09:01.000+0000 |
Affected Version/s | Release 4.1.0 |
Fix Version/s | Release 5.0.0 |
Components | Windows |
Labels | n/a |
Reporter | Jörgen Buder |
Assignee | Kota Iguchi |
Created | 2015-08-13T14:51:04.000+0000 |
Updated | 2015-08-19T23:29:10.000+0000 |
Description
Our current code assumes that the JSObject has string property names (which is valid) and either String or Ti.Blob values. It needs to handle other value types and convert them into strings.
The following works on iOS/Android, but fails on Windows:
var datas = {
'authenticatestring': Alloy.Globals.authenticateString,
'functionName': 'registerNewReceiver',
'apiVersion' : Alloy.Globals.serverApiVersion,
'languageId' : Alloy.Globals.serverLanguage,
'deviceId' : Alloy.Globals.deviceId,
'purchaseId' : 9846598
};
httpClient.send();
This is because our code take the numeric value for 'purchaseId' and since it's not a string assumes it's a Blob and attempts to pull a native Ti.Blob object out of it.
https://github.com/appcelerator/titanium_mobile_windows/pull/407
Verified the fix. Ti.Network.HTTPClient.send does not fail when arg object has non-string/Blob values. Closing. Environment: Appc Studio: 5.0.0.v20150819140421 Ti SDK: 5.0.0.v20150819140421 Ti CLI: 4.1.4 Alloy: 1.6.2 Windows: 8.1 Enterprise 64-bit APPC NPM: 4.2.0-1 APPC CLI: 5.0.0-3 Node : v0.10.37 Device: Nokia Lumia 928 - Windows Phone 8.1 Windows emulator : 8.1