Questions tagged [http-delete]

DELETE is an HTTP request method used to delete a specified resource on server side.

DELETE is an HTTP method which requests that the origin server delete the resource identified by the request URL. This method may be overridden by human intervention (or other means) on the origin server. The client cannot be guaranteed that the operation has been carried out, even if the status code returned from the origin server indicates that the action has been completed successfully. However, the server should not indicate success unless, at the time the response is given, it intends to delete the resource or move it to an inaccessible location.

A successful response should be 200 (OK) if the response includes a response body describing the status, 202 (Accepted) if the action has not yet been enacted, or 204 (No Content) if the action has been enacted but the response does not include a response body.

If the request passes through a cache and the URL identifies one or more currently cached entities, those entries should be treated as stale. Responses to this method are not cacheable.

References- apache.org, w3.org

536 questions
3
votes
1 answer

HTTP RESTful Webservice Logout: Which is correct or better practice - POST or DELETE?

As stated by the accepted answer in Which HTTP method should Login and Logout Actions use in a "RESTful" setup it is recommendable to use HTTP POST (= create) for a login in a RESTful webservice (e.g. /webservice/login/). POST is neither idempotent…
Blackbam
  • 17,496
  • 26
  • 97
  • 150
3
votes
3 answers

DELETE request in ajax giving 301 moved response

I am trying to make a delete request using ajax method of jquery as follows $.ajax( { type: 'DELETE', url: '/tagz', data: {id: taskId}, success: function(data) { console.log(data); } }); And when I see the console in chrome, I find…
Goje87
  • 2,839
  • 7
  • 28
  • 48
3
votes
1 answer

Does ColdFusion 11 support body content for HTTP DELETE verb

The below script block on ColdFUsion 11 has GetHttpRequestData().content as hello If I change the verb to DELETE it is empty. So ... Does ColdFusion not support this when making requests via cfhttp? Is this the wrong way? Is there a…
AdiFatLady
  • 368
  • 1
  • 6
  • 18
3
votes
0 answers

Spring PUT and DELETE: Request method not supported

I'm trying to use RequestMethod.PUT and RequestMethod.DELETE in Spring MVC controller. My controller has a @RequestMapping for PUT and DELETE, but despite that, I'm getting error when trying to use it: Request method 'GET'/'POST' not…
bartex9
  • 391
  • 3
  • 19
3
votes
2 answers

DELETE Request with Body (Without using Deprecated HttpEntity)

I wanted to execute a HTTP DELETE request with a Body. I am using Spring Framework. In order to do that, I had to do the following modification: RestTemplate _deleteManager; _deleteManager = new RestTemplate(); _deleteManager.setRequestFactory(new…
Y2theZ
  • 10,162
  • 38
  • 131
  • 200
3
votes
2 answers

RESTAngular - DELETE, not working as it should

If i am not mistaken in RESTful services in order to remove a record you need to do this: Delete a product: DELETE /api/product/id (reference) But in RESTAngular when i do for example product.remove(); A DELETE request is made to /api/product…
Christos Baziotis
  • 5,845
  • 16
  • 59
  • 80
3
votes
4 answers

Delete Artifactory build artifacts using REST API

I have the following build artefacts in Artifactory…
AKS
  • 16,482
  • 43
  • 166
  • 258
3
votes
1 answer

REST and DELETE -> passing parameters

So this question has been asked numerous times in SO and elsewhere. On SO this is probably the question with the most comprehensive answers and comments. REST, HTTP DELETE and parameters In my scenario I want to add information to a delete request,…
w--
  • 6,427
  • 12
  • 54
  • 92
3
votes
1 answer

How allow HTTP methods "PUT" and "DELETE" in Flask?

I'm beginning in Python and I try to do PUT and DELETE methods like this: import gamerocket from flask import Flask, request, render_template app = Flask(__name__) gamerocket.Configuration.configure(gamerocket.Environment.Development, …
Nincha
  • 31
  • 1
  • 6
3
votes
2 answers

How to pass parameter using Ext.Ajax.request when method type is DELETE

I am trying to send use Ext.Ajax.request method to delete some data on server. My request method looks as below : Ext.Ajax.request({ url: '/myserver/restful/service/delete', method: 'DELETE', headers: { 'Content-Type':…
Shekhar
  • 11,438
  • 36
  • 130
  • 186
3
votes
1 answer

Perl REST: How to send DELETE request with some data (sic!)?

There is a web service, that working with data in it's onDelete method; so, I need to transfer some data with my DELETE request... And I actually have completely no idea how to do that in Perl :( Does anyone have any ideas about that? Maybe, someone…
No Way
  • 183
  • 9
3
votes
1 answer

Rails session gets destroyed on DELETE request

Possible Duplicate: WARNING: Can't verify CSRF token authenticity rails I send a DELETE HTTP request using JQuery AJAX. The URL (/myitems/1234) differs from logout URL (/users/sign_out), but after the request I discover that user session was…
Paul
  • 25,812
  • 38
  • 124
  • 247
3
votes
2 answers

http delete 403 error tomcat

From my android application, I am trying to delete an image that is stored in the tomcat's webapps directory. When I try the following code its giving me 403 status code. I looked up online and found it gives that code if the request is legal but…
Ash
  • 95
  • 2
  • 3
  • 11
2
votes
2 answers

Origin is not allowed by Access-Control-Allow-Origin for HTTP DELETE

I currently playing around with the Facebook JavaScript SDK and the Scores API ( https://developers.facebook.com/docs/score/ ). I wrote a small application to save (post) scores and now I want to delete scores. Posting (saving) them works fine. My…
Benny Code
  • 51,456
  • 28
  • 233
  • 198
2
votes
1 answer

Backbone JS - Deleting a model in a REST interface

I am writing a Backbone application which should interface to a REST API. My problem arises when a user deletes a model that has already been deleted by someone else. In my opinion, the backend should just return success (200), as the model is…
Andrea
  • 20,253
  • 23
  • 114
  • 183