{ "id": "118959", "key": "TIMOB-14954", "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": [ { "id": "15931", "description": "2014 Sprint 05", "name": "2014 Sprint 05", "archived": true, "released": true, "releaseDate": "2014-03-14" }, { "id": "15932", "description": "2014 Sprint 05 API", "name": "2014 Sprint 05 API", "archived": true, "released": true, "releaseDate": "2014-03-14" }, { "id": "15971", "description": "Release 3.2.3", "name": "Release 3.2.3", "archived": false, "released": true, "releaseDate": "2014-04-30" }, { "id": "15422", "description": "Release 3.3.0", "name": "Release 3.3.0", "archived": false, "released": true, "releaseDate": "2014-07-16" } ], "resolution": { "id": "1", "description": "A fix for this issue is checked into the tree and tested.", "name": "Fixed" }, "resolutiondate": "2014-03-03T23:50:36.000+0000", "created": "2013-08-23T14:59:03.000+0000", "priority": { "name": "Medium", "id": "3" }, "labels": [], "versions": [ { "id": "15593", "description": "Release 3.1.3", "name": "Release 3.1.3", "archived": true, "released": true, "releaseDate": "2013-09-18" } ], "issuelinks": [ { "id": "33104", "type": { "id": "10003", "name": "Relates", "inward": "relates to", "outward": "relates to" }, "inwardIssue": { "id": "119583", "key": "TIMOB-15065", "fields": { "summary": "Android: HTTPClient does not send body for DELETE requests", "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" } }, "priority": { "name": "Low", "id": "4" }, "issuetype": { "id": "2", "description": "A new feature of the product, which has yet to be developed.", "name": "New Feature", "subtask": false } } } } ], "assignee": { "name": "vduggal", "key": "vduggal", "displayName": "Vishal Duggal", "active": false, "timeZone": "America/Los_Angeles" }, "updated": "2014-03-24T21:54:21.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": "10206", "name": "iOS", "description": "iOS Platform" } ], "description": "The ASIHTTP lib converts DELETE requests to POST. Reference the file here: https://github.com/appcelerator/titanium_mobile/blob/master/iphone/Classes/ASI/ASIHTTPRequest.m#L561\r\n\r\nPer a typical RESTful service, DELETE is a normal verb used for...deleting a resource. This needs to be supported.", "attachment": [], "flagged": false, "summary": "iOS: ASI HTTP Library converts DELETE requests to POST requests", "creator": { "name": "rblalock", "key": "rblalock", "displayName": "Rick Blalock", "active": false, "timeZone": "America/Havana" }, "subtasks": [], "reporter": { "name": "rblalock", "key": "rblalock", "displayName": "Rick Blalock", "active": false, "timeZone": "America/Havana" }, "environment": "iOS", "comment": { "comments": [ { "id": "267834", "author": { "name": "skypanther", "key": "skypanther", "displayName": "Tim Poulsen", "active": true, "timeZone": "America/New_York" }, "body": "The HTTP client object should support ALL verbs, in particular those in RFC 2616 (http://ietf.org/rfc/rfc2616). See http://annevankesteren.nl/2007/10/http-methods for an even more comprehensive list.", "updateAuthor": { "name": "skypanther", "key": "skypanther", "displayName": "Tim Poulsen", "active": true, "timeZone": "America/New_York" }, "created": "2013-08-23T15:05:08.000+0000", "updated": "2013-08-23T15:05:08.000+0000" }, { "id": "268104", "author": { "name": "rblalock", "key": "rblalock", "displayName": "Rick Blalock", "active": false, "timeZone": "America/Havana" }, "body": "Why would it be invalid?", "updateAuthor": { "name": "rblalock", "key": "rblalock", "displayName": "Rick Blalock", "active": false, "timeZone": "America/Havana" }, "created": "2013-08-26T13:19:05.000+0000", "updated": "2013-08-26T13:19:05.000+0000" }, { "id": "283202", "author": { "name": "rblalock", "key": "rblalock", "displayName": "Rick Blalock", "active": false, "timeZone": "America/Havana" }, "body": "I agree with Tim that all REST verbs should be supported and not converted.", "updateAuthor": { "name": "rblalock", "key": "rblalock", "displayName": "Rick Blalock", "active": false, "timeZone": "America/Havana" }, "created": "2013-12-09T13:58:19.000+0000", "updated": "2013-12-09T13:58:19.000+0000" }, { "id": "283204", "author": { "name": "jspain", "key": "jspain", "displayName": "Jamil Spain", "active": false, "timeZone": "America/New_York" }, "body": "I need to demo a rest api adapter for Cisco this week demonstrating we can do at a minimum GET, POST, PUT, DELETE.. Let me know if this can be pushed in with 3.2.0 SDK", "updateAuthor": { "name": "jspain", "key": "jspain", "displayName": "Jamil Spain", "active": false, "timeZone": "America/New_York" }, "created": "2013-12-09T14:28:13.000+0000", "updated": "2013-12-09T14:28:13.000+0000" }, { "id": "283206", "author": { "name": "bgrantges@appcelerator.com", "key": "bgrantges", "displayName": "Bert Grantges", "active": false, "timeZone": "America/Chicago" }, "body": "we are also doing some work for demoing an interface layer that leverages HTTP verbs - as a core demo for our platform. Anything we can do to push this into 3.2 would be huge.\n", "updateAuthor": { "name": "bgrantges@appcelerator.com", "key": "bgrantges", "displayName": "Bert Grantges", "active": false, "timeZone": "America/Chicago" }, "created": "2013-12-09T14:38:30.000+0000", "updated": "2013-12-09T14:38:30.000+0000" }, { "id": "295401", "author": { "name": "vduggal", "key": "vduggal", "displayName": "Vishal Duggal", "active": false, "timeZone": "America/Los_Angeles" }, "body": "master - https://github.com/appcelerator/titanium_mobile/pull/5411 ", "updateAuthor": { "name": "vduggal", "key": "vduggal", "displayName": "Vishal Duggal", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2014-03-03T23:50:36.000+0000", "updated": "2014-03-03T23:50:36.000+0000" }, { "id": "295404", "author": { "name": "penrique", "key": "penrique", "displayName": "Pedro Enrique", "active": false, "timeZone": "America/Los_Angeles" }, "body": "Backport for 3.2.X https://github.com/appcelerator/titanium_mobile/pull/5412", "updateAuthor": { "name": "penrique", "key": "penrique", "displayName": "Pedro Enrique", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2014-03-03T23:52:00.000+0000", "updated": "2014-03-03T23:52:00.000+0000" }, { "id": "295405", "author": { "name": "vduggal", "key": "vduggal", "displayName": "Vishal Duggal", "active": false, "timeZone": "America/Los_Angeles" }, "body": "Note to QE. Do not close ticket till backport PR is merged for 3.2.3 release.\r\n", "updateAuthor": { "name": "vduggal", "key": "vduggal", "displayName": "Vishal Duggal", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2014-03-03T23:52:36.000+0000", "updated": "2014-03-11T17:37:55.000+0000" }, { "id": "298489", "author": { "name": "wluu", "key": "wluu", "displayName": "Wilson Luu", "active": false, "timeZone": "America/Los_Angeles" }, "body": "Closing ticket as fixed. Verified two cases:\n\n1. The failure case (this ticket), which is using SDK 3.2.2.GA, was able to *successfully* send a DELETE request to a POST url\n2. The fix, which is using SDK 3.2.3 and 3.3.0, was able to send a DELETE request to a POST url and receive a *405 error code* from the server (expected)\n\nUsing the default Titanium Classic app, I used this code to verify the fix:\n{code}\nlabel1.addEventListener('click', function(e){\n\t// accepts only POST requests\n\tvar url = 'http://httpbin.org/post';\n\t\n\tvar client = Ti.Network.createHTTPClient({\n\t\t\n\t\tonload : function(e) {\n\t\t\tvar msg = 'onload: ' + this.responseText;\n\t\t\tTi.API.info(msg);\n\t\t\talert(msg);\n\t\t},\n\t\t\n\t\tonerror : function(e) {\n\t\t\t// var msg = 'onerror: ' + 'error code -> ' + e.code + ', error -> ' + e.error;\n\t\t\tvar msg = 'onerror: ' + this.statusText;\n\t\t\tTi.API.error(msg);\n\t\t\talert(msg);\n\t\t},\n\t\t\n\t\tcache: false\n\t});\n\t\n\tclient.open('DELETE', url);\n\tclient.send('DELETE THE MONKEY');\n});\n{code}\n\n*Tested on:*\nAppcelerator Studio, build: 3.2.3.201403190645\nSDK build: 3.2.3.v20140324094107, 3.3.0.v20140324131123\nCLI: 3.2.1\nXcode: 5.1\nDevices: iphone 5 (7.0.6), iphone 5s (7.1)", "updateAuthor": { "name": "wluu", "key": "wluu", "displayName": "Wilson Luu", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2014-03-24T21:54:03.000+0000", "updated": "2014-03-24T21:54:03.000+0000" } ], "maxResults": 15, "total": 15, "startAt": 0 } } }