{ "id": "118658", "key": "AC-2208", "fields": { "issuetype": { "id": "1", "description": "A problem which impairs or prevents the functions of the product.", "name": "Bug", "subtask": false }, "project": { "id": "12217", "key": "AC", "name": "Appcelerator - INBOX", "projectCategory": { "id": "10000", "description": "", "name": "Customer Service" } }, "resolution": { "id": "5", "description": "All attempts at reproducing this issue failed, or not enough information was available to reproduce the issue. Reading the code produces no clues as to why this behavior would occur. If more information appears later, please reopen the issue.", "name": "Cannot Reproduce" }, "resolutiondate": "2013-08-22T23:00:19.000+0000", "created": "2013-08-16T14:05:58.000+0000", "labels": [ "android" ], "versions": [], "issuelinks": [ { "id": "31260", "type": { "id": "10002", "name": "Duplicate", "inward": "is duplicated by", "outward": "duplicates" }, "inwardIssue": { "id": "116193", "key": "TIMOB-14939", "fields": { "summary": "Android: POST method does not work", "status": { "description": "This issue was once resolved, but the resolution was deemed incorrect. From here issues are either marked assigned or resolved.", "name": "Reopened", "id": "4", "statusCategory": { "id": 2, "key": "new", "colorName": "blue-gray", "name": "To Do" } }, "priority": { "name": "Low", "id": "4" }, "issuetype": { "id": "1", "description": "A problem which impairs or prevents the functions of the product.", "name": "Bug", "subtask": false } } } } ], "assignee": { "name": "mpmiranda", "key": "mpmiranda", "displayName": "Mauro Parra-Miranda", "active": true, "timeZone": "America/Mexico_City" }, "updated": "2016-03-08T07:41:12.000+0000", "status": { "description": "The issue is considered finished, the resolution is correct. Issues which are closed can be reopened.", "name": "Closed", "id": "6", "statusCategory": { "id": 3, "key": "done", "colorName": "green", "name": "Done" } }, "components": [ { "id": "14544", "name": "Alloy", "description": "Please enter tickets related to the Alloy here." }, { "id": "14548", "name": "Titanium SDK & CLI", "description": "Please enter tickets related to the MobileSDK here." } ], "description": "I have been trying to connect to my remote server and it works correctly in iOS but not in Android.\r\n\r\nThis is the code:\r\n\r\n{code:javascript}\r\nvar params = {\r\n\tusername : 'yourUserName',\r\n\tpassword : 'yourPassWord'\r\n};\r\nvar url = \"http://www.google.com/\";\r\n\r\nvar xhr = Ti.Network.createHTTPClient({\r\n\tonload : function(e) {\r\n\t\tTi.API.debug(this.responseText);\r\n\t\talert('success');\r\n\t},\r\n\tonerror : function(e) {\r\n\t\tTi.API.debug(e.error);\r\n\t\talert('error');\r\n\t},\r\n\ttimeout : 5000,\r\n});\r\n\r\nxhr.open(\"POST\", url);\r\nxhr.setRequestHeader(\"Content-Type\", \"application/x-www-form-urlencoded\");\r\nxhr.send(params);\r\n{code}", "attachment": [], "flagged": false, "summary": "Android: HTTPClient POST is not working", "creator": { "name": "bradenpowers", "key": "bradenpowers", "displayName": "Braden Powers", "active": true, "timeZone": "America/New_York" }, "subtasks": [], "reporter": { "name": "bradenpowers", "key": "bradenpowers", "displayName": "Braden Powers", "active": true, "timeZone": "America/New_York" }, "environment": "iOS 6 and Android 2.3 and greater", "comment": { "comments": [ { "id": "266869", "author": { "name": "sfeather", "key": "sfeather", "displayName": "Stephen Feather", "active": true, "timeZone": "America/New_York" }, "body": "#1 The JIRA is for reporting verified, use case backed problems with the platform. This should be in the Q&A if you are a community level user, or in the help desk of enterprise.\r\n\r\n#2 Since we KNOW that httpclient works on android, this is NOT a verified problem with the platform.\r\n\r\n#3 You have two onerror/timeout declarations, and while the second should overwrite the first, it leads me to question your programming skills as you have posted pretty dirty code.\r\n\r\n#4 There is not enough information to produce a test case. Ticket should be closed.\r\n\r\n#5 httpClient works for me. Ticket should be closed.\r\n", "updateAuthor": { "name": "sfeather", "key": "sfeather", "displayName": "Stephen Feather", "active": true, "timeZone": "America/New_York" }, "created": "2013-08-16T14:14:59.000+0000", "updated": "2013-08-16T14:16:54.000+0000" }, { "id": "267718", "author": { "name": "bradenpowers", "key": "bradenpowers", "displayName": "Braden Powers", "active": true, "timeZone": "America/New_York" }, "body": "I have confirmed by going through different versions of the Titanium SDK that it does work with 3.1.0 and actually stopped working in 3.1.1.", "updateAuthor": { "name": "bradenpowers", "key": "bradenpowers", "displayName": "Braden Powers", "active": true, "timeZone": "America/New_York" }, "created": "2013-08-22T22:53:23.000+0000", "updated": "2013-08-22T22:53:23.000+0000" }, { "id": "267720", "author": { "name": "dsefton", "key": "dsefton", "displayName": "Daniel Sefton", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Hi Braden,\r\n\r\nI have changed the test case to have valid syntax. You're welcome to try it again.\r\n\r\nIdeally we will need your server URL (and code) to be able to reproduce the issue.\r\n\r\nAlso please state your Ti SDK version.\r\n\r\nThanks.", "updateAuthor": { "name": "dsefton", "key": "dsefton", "displayName": "Daniel Sefton", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2013-08-22T23:00:19.000+0000", "updated": "2013-08-22T23:00:19.000+0000" }, { "id": "267721", "author": { "name": "dsefton", "key": "dsefton", "displayName": "Daniel Sefton", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Can you try it with 3.1.2 as well?", "updateAuthor": { "name": "dsefton", "key": "dsefton", "displayName": "Daniel Sefton", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2013-08-22T23:01:21.000+0000", "updated": "2013-08-22T23:01:21.000+0000" }, { "id": "267723", "author": { "name": "bradenpowers", "key": "bradenpowers", "displayName": "Braden Powers", "active": true, "timeZone": "America/New_York" }, "body": "Sorry syntax was a mess. I did confirm it didn't work with 3.1.2 as well.", "updateAuthor": { "name": "bradenpowers", "key": "bradenpowers", "displayName": "Braden Powers", "active": true, "timeZone": "America/New_York" }, "created": "2013-08-22T23:05:31.000+0000", "updated": "2013-08-22T23:05:31.000+0000" }, { "id": "267724", "author": { "name": "bradenpowers", "key": "bradenpowers", "displayName": "Braden Powers", "active": true, "timeZone": "America/New_York" }, "body": "The server is running drupal 6.0 using hte 3.0 services module.", "updateAuthor": { "name": "bradenpowers", "key": "bradenpowers", "displayName": "Braden Powers", "active": true, "timeZone": "America/New_York" }, "created": "2013-08-22T23:07:15.000+0000", "updated": "2013-08-22T23:07:15.000+0000" }, { "id": "267732", "author": { "name": "dsefton", "key": "dsefton", "displayName": "Daniel Sefton", "active": true, "timeZone": "America/Los_Angeles" }, "body": "There is also a similar report at TC-2501. But it's hard for us to know the problem without being able to reproduce it. It looks like a server specific issue, but it's interesting that you're seeing a regression between 3.1.0 and 3.1.1.\n\nI might escalate TC-2501 and we can go from there.", "updateAuthor": { "name": "dsefton", "key": "dsefton", "displayName": "Daniel Sefton", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2013-08-22T23:22:16.000+0000", "updated": "2013-08-22T23:22:16.000+0000" }, { "id": "280885", "author": { "name": "mpmiranda", "key": "mpmiranda", "displayName": "Mauro Parra-Miranda", "active": true, "timeZone": "America/Mexico_City" }, "body": "DUP TIMOB-14939", "updateAuthor": { "name": "mpmiranda", "key": "mpmiranda", "displayName": "Mauro Parra-Miranda", "active": true, "timeZone": "America/Mexico_City" }, "created": "2013-11-24T06:53:55.000+0000", "updated": "2013-11-24T06:53:55.000+0000" } ], "maxResults": 8, "total": 8, "startAt": 0 } } }