{ "id": "132734", "key": "TIMOB-17284", "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": "2014-07-08T15:15:07.000+0000", "priority": { "name": "Low", "id": "4" }, "labels": [], "versions": [ { "id": "15422", "description": "Release 3.3.0", "name": "Release 3.3.0", "archived": false, "released": true, "releaseDate": "2014-07-16" } ], "issuelinks": [], "assignee": null, "updated": "2018-02-28T20:03:36.000+0000", "status": { "description": "The issue is open and ready for the assignee to start work on it.", "name": "Open", "id": "1", "statusCategory": { "id": 2, "key": "new", "colorName": "blue-gray", "name": "To Do" } }, "components": [ { "id": "10202", "name": "Android", "description": "Android Platform" } ], "description": "h2. problem\r\n\r\nWhen passing the {{method}} property to {{HTTPClient.open()}} on iOS the method can be either upper or lower case. For example, both {{get}} and {{GET}} would both work for a GET request. On Android, though, only {{GET}} would work. If you use {{get}}, you get something along the lines of this error (when targeting \"google.com\" for example):\r\n\r\n{code}\r\n[ERROR] TiHttpClient: (TiHttpClient-1) [678,678] HTTP Error (org.apache.http.client.HttpResponseException): Method Not Allowed\r\n[ERROR] TiHttpClient: org.apache.http.client.HttpResponseException: Method Not Allowed\r\n[ERROR] TiHttpClient: \tat ti.modules.titanium.network.TiHTTPClient$LocalResponseHandler.handleResponse(TiHTTPClient.java:259)\r\n[ERROR] TiHttpClient: \tat ti.modules.titanium.network.TiHTTPClient$LocalResponseHandler.handleResponse(TiHTTPClient.java:218)\r\n[ERROR] TiHttpClient: \tat org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:657)\r\n[ERROR] TiHttpClient: \tat org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:637)\r\n[ERROR] TiHttpClient: \tat ti.modules.titanium.network.TiHTTPClient$ClientRunnable.run(TiHTTPClient.java:1291)\r\n[ERROR] TiHttpClient: \tat java.lang.Thread.run(Thread.java:841)\r\n[ERROR] (405) Method Not Allowed\r\n[ERROR] \r\n[ERROR] \r\n[ERROR] \r\n[ERROR] \r\n[ERROR] Error 405 (Method Not Allowed)!!1\r\n[ERROR] \r\n[ERROR] \r\n[ERROR]

405. That’s an error.\r\n[ERROR]

The request method get is inappropriate for the URL /. That’s all we know.\r\n{code}\r\n\r\nh2. test case\r\n\r\n{code:javascript}\r\nvar client = Ti.Network.createHTTPClient({\r\n\tonload : function(e) {\r\n\t\tTi.API.info(this.responseText);\r\n\t},\r\n\tonerror : function(e) {\r\n\t\treturn Ti.API.error('(' + this.status + ') ' + e.error + '\\n' + this.responseText);\r\n\t}\r\n});\r\n\r\nclient.open('get', 'http://google.com'); // change to \"GET\" and android will work\r\nclient.send();\r\n{code}\r\n\r\nh2. expected\r\n\r\nAndroid {{method}} for {{HTTPClient.open()}} should be allowed to be specified in upper or lower case.\r\n\r\nh2. actual\r\n\r\nAndroid calls end in error if {{method}} is lowercase.", "attachment": [], "flagged": false, "summary": "Android: HTTPClient.open() parity issue with \"method\" parameter", "creator": { "name": "tlukasavage", "key": "tlukasavage", "displayName": "Tony Lukasavage", "active": true, "timeZone": "America/Los_Angeles" }, "subtasks": [], "reporter": { "name": "tlukasavage", "key": "tlukasavage", "displayName": "Tony Lukasavage", "active": true, "timeZone": "America/Los_Angeles" }, "environment": "Android emulator 4.4.2\r\niOS sim 7.1", "comment": { "comments": [ { "id": "312824", "author": { "name": "ngupta", "key": "ngupta", "displayName": "Neeraj Gupta", "active": true, "timeZone": "America/Los_Angeles" }, "body": "[~ingo] FYI", "updateAuthor": { "name": "ngupta", "key": "ngupta", "displayName": "Neeraj Gupta", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2014-07-08T15:24:13.000+0000", "updated": "2014-07-08T15:24:13.000+0000" }, { "id": "312833", "author": { "name": "ingo", "key": "ingo", "displayName": "Ingo Muschenetz", "active": true, "timeZone": "America/Los_Angeles" }, "body": "It appears it might be related to https://github.com/appcelerator/titanium_mobile/blob/7724a0083693811d93b74c6c2b98f956fb8edfff/android/modules/network/src/java/ti/modules/titanium/network/TiHTTPClient.java#L1110.", "updateAuthor": { "name": "ingo", "key": "ingo", "displayName": "Ingo Muschenetz", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2014-07-08T15:47:43.000+0000", "updated": "2014-07-08T15:47:43.000+0000" }, { "id": "312837", "author": { "name": "ngupta", "key": "ngupta", "displayName": "Neeraj Gupta", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Yeah. Looks like it.", "updateAuthor": { "name": "ngupta", "key": "ngupta", "displayName": "Neeraj Gupta", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2014-07-08T15:58:45.000+0000", "updated": "2014-07-08T15:58:45.000+0000" } ], "maxResults": 3, "total": 3, "startAt": 0 } } }