{ "id": "116193", "key": "TIMOB-14939", "fields": { "issuetype": { "id": "1", "description": "A problem which impairs or prevents the functions of the product.", "name": "Bug", "subtask": false }, "project": { "id": "10153", "key": "TIMOB", "name": "Titanium SDK/CLI", "projectCategory": { "id": "10100", "description": "Titanium and related SDKs used in application development", "name": "Client" } }, "fixVersions": [], "resolution": null, "resolutiondate": null, "created": "2013-06-19T18:54:16.000+0000", "priority": { "name": "Low", "id": "4" }, "labels": [], "versions": [ { "id": "15478", "description": "Release 3.1.1", "name": "Release 3.1.1", "archived": true, "released": true, "releaseDate": "2013-06-17" }, { "id": "15479", "description": "Release 3.1.2", "name": "Release 3.1.2", "archived": true, "released": true, "releaseDate": "2013-07-31" } ], "issuelinks": [ { "id": "31260", "type": { "id": "10002", "name": "Duplicate", "inward": "is duplicated by", "outward": "duplicates" }, "outwardIssue": { "id": "118658", "key": "AC-2208", "fields": { "summary": "Android: HTTPClient POST is not working", "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" } }, "issuetype": { "id": "1", "description": "A problem which impairs or prevents the functions of the product.", "name": "Bug", "subtask": false } } } } ], "assignee": null, "updated": "2018-02-28T20:03:29.000+0000", "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" } }, "components": [ { "id": "10202", "name": "Android", "description": "Android Platform" } ], "description": "*Test case*\r\n{code:javascript}\r\n// open a single window\r\nvar win = Ti.UI.createWindow({\r\n\tbackgroundColor : 'white'\r\n});\r\nvar label = Ti.UI.createLabel();\r\nwin.add(label);\r\nwin.open();\r\n\r\nvar xhr = Titanium.Network.createHTTPClient();\r\nxhr.onload = function() {\r\n\t// data = JSON.parse(data);\r\n\talert(this.responseText);\r\n\r\n}\r\nvar url = \"http://ophoboo.de/fincha/test.php?testget=1\";\r\nxhr.open(\"POST\", url);\r\nxhr.send({\r\n\t\"testpost\" : \"buuhhh\"\r\n});\r\n{code}\r\n\r\n\r\ntest.php\r\n{code}\r\n\r\n{code}\r\n\r\ntest.php print_r the $_POST and the $_GET arrays. On the screenshot I attached you can see the android code does not send POST Data correctly.\r\n\r\nBUT\r\n\r\nthe strengest thing is, if you send a request to this file:\r\n\r\nhttp://fincha.com/test.php?testget=1\r\n\r\nits only printing the $_POST (but it doesn't metter)\r\n\r\nyou get a correct response.\r\n\r\nFirst I was thinking it might be a server problem, but the iOS App send data correctly to both servers.\r\n\r\n3.2.0.v20130522185622\r\n3.1.0.GA", "attachment": [ { "id": "40018", "filename": "Bildschirmfoto 2013-06-19 um 20.50.47.png", "author": { "name": "fincha", "key": "fincha", "displayName": "Alexander Frischbutter", "active": true, "timeZone": "Europe/Berlin" }, "created": "2013-06-19T18:55:11.000+0000", "size": 175411, "mimeType": "image/png" }, { "id": "40019", "filename": "Bildschirmfoto 2013-06-19 um 20.52.31.png", "author": { "name": "fincha", "key": "fincha", "displayName": "Alexander Frischbutter", "active": true, "timeZone": "Europe/Berlin" }, "created": "2013-06-19T18:55:11.000+0000", "size": 44366, "mimeType": "image/png" } ], "flagged": false, "summary": "Android: POST method does not work", "creator": { "name": "fincha", "key": "fincha", "displayName": "Alexander Frischbutter", "active": true, "timeZone": "Europe/Berlin" }, "subtasks": [], "reporter": { "name": "fincha", "key": "fincha", "displayName": "Alexander Frischbutter", "active": true, "timeZone": "Europe/Berlin" }, "environment": null, "comment": { "comments": [ { "id": "258610", "author": { "name": "dsefton", "key": "dsefton", "displayName": "Daniel Sefton", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Would it be possible to supply the code you use in test.php as well?", "updateAuthor": { "name": "dsefton", "key": "dsefton", "displayName": "Daniel Sefton", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2013-06-19T20:47:59.000+0000", "updated": "2013-06-19T20:47:59.000+0000" }, { "id": "258614", "author": { "name": "iotashan", "key": "iotashan", "displayName": "Shannon Hicks", "active": true, "timeZone": "America/Chicago" }, "body": "Out of curiosity, try passing a javascript object instead of JSON:\n\n{code}\ntestpost : \"buuhhh\"\n{code}", "updateAuthor": { "name": "iotashan", "key": "iotashan", "displayName": "Shannon Hicks", "active": true, "timeZone": "America/Chicago" }, "created": "2013-06-19T20:55:35.000+0000", "updated": "2013-06-19T20:55:35.000+0000" }, { "id": "258616", "author": { "name": "fincha", "key": "fincha", "displayName": "Alexander Frischbutter", "active": true, "timeZone": "Europe/Berlin" }, "body": "added the test.php code", "updateAuthor": { "name": "fincha", "key": "fincha", "displayName": "Alexander Frischbutter", "active": true, "timeZone": "Europe/Berlin" }, "created": "2013-06-19T20:57:51.000+0000", "updated": "2013-06-19T20:57:51.000+0000" }, { "id": "264077", "author": { "name": "shossain", "key": "shossain", "displayName": "Shak Hossain", "active": false, "timeZone": "America/Los_Angeles" }, "body": "Closing this as invalid a code fix was recommended. If you have any further problem with this, please reopen as necessary.", "updateAuthor": { "name": "shossain", "key": "shossain", "displayName": "Shak Hossain", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2013-07-31T02:32:16.000+0000", "updated": "2013-07-31T02:32:16.000+0000" }, { "id": "264118", "author": { "name": "fincha", "key": "fincha", "displayName": "Alexander Frischbutter", "active": true, "timeZone": "Europe/Berlin" }, "body": "Have you tested it with this file/server http://ophoboo.de/fincha/test.php?testget=1\n\nThis is very specific problem. But it is still there.", "updateAuthor": { "name": "fincha", "key": "fincha", "displayName": "Alexander Frischbutter", "active": true, "timeZone": "Europe/Berlin" }, "created": "2013-07-31T07:47:22.000+0000", "updated": "2013-07-31T07:47:22.000+0000" }, { "id": "264174", "author": { "name": "dsefton", "key": "dsefton", "displayName": "Daniel Sefton", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Can you try this server: http://mrtechnologybd.com/test111.php\n\nCode used there:\n{code}\t\n\n{code}", "updateAuthor": { "name": "dsefton", "key": "dsefton", "displayName": "Daniel Sefton", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2013-07-31T16:48:12.000+0000", "updated": "2013-07-31T16:48:12.000+0000" }, { "id": "264394", "author": { "name": "fincha", "key": "fincha", "displayName": "Alexander Frischbutter", "active": true, "timeZone": "Europe/Berlin" }, "body": "Yes I know it might be a server specific problem, but if you test this server \"http://ophoboo.de/fincha/test.php?testget=1\" with iOS it works fine. This is only an android problem.\n\nI mean maybe some header are wrong or different, if you need some more output there I can provide you a ftp access.", "updateAuthor": { "name": "fincha", "key": "fincha", "displayName": "Alexander Frischbutter", "active": true, "timeZone": "Europe/Berlin" }, "created": "2013-08-01T10:42:40.000+0000", "updated": "2013-08-01T10:42:40.000+0000" } ], "maxResults": 10, "total": 10, "startAt": 0 } } }