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
7
votes
2 answers

Asp.net WEB API - What problems could arise if I use POST instead of PUT and DELETE?

I'm just starting to use Web API and though I found it really easy to create the methods and some configurations I needed, now I run into a problem I don't know how to solve. Some of the applications that will consume my services are very old and…
eddy
  • 4,373
  • 16
  • 60
  • 94
7
votes
1 answer

How to use HTTP method DELETE on Google App Engine?

I can use this verb in the Python Windows SDK. But not in production. Why? What am I doing wrong? The error message includes (only seen via firebug or fiddler) Malformed request or something like that My code looks like: from google.appengine.ext…
Jader Dias
  • 88,211
  • 155
  • 421
  • 625
7
votes
3 answers

Cannot delete document because of update conflict

This is how I get the document and check for newer revisions: curl …
Kristian
  • 21,204
  • 19
  • 101
  • 176
7
votes
3 answers

LinkedIn Oauth - Revoke access from C#

I have my users already authenticated to my LinkedIn app but I also want to give them the possibility to de-authenticate from my app any given time. I think I'm just missing the http delete url to do it but i'm not sure. Thanks
franciscovalera
  • 111
  • 1
  • 1
  • 14
6
votes
5 answers

How to perform a HTTP delete? All I am given is the URL

I'm just a starter in java and would like to know how to make a HTTP Delete call to a URL. Any small piece of code or reference material would be very helpful. I know that the question would sound very simply, but I am in urgent of this information.
Winz
  • 237
  • 3
  • 6
  • 14
6
votes
2 answers

Problems doing a proper HTTP Delete with Ajax.ActionLink

What i'm trying to do: Try to delete a record using a "proper" HTTP Delete. Controller Code: [HttpDelete] public void DeleteRun(int RunId) { repository.RemoveEntry(RunId); } Razor View: …
coding4fun
  • 8,038
  • 13
  • 58
  • 85
6
votes
1 answer

Laravel DELETE method with request body

I've been trying to add a FormRequest with rules and message to my delete method, but the request is coming back empty and the rules are failing every time. Is it possible to get the request data in a delete method? Here's my request class: use…
user7856768
6
votes
2 answers

REST API Design - DELETE multiple items using request Body

I have an API that displays Supplier Products Our UI will allow the user to select various filter criteria and use that to delete a number of products at once. The problem is that it takes too long do do a few thousand individual HTTP delete…
ShaunP
  • 463
  • 1
  • 5
  • 20
6
votes
2 answers

AngularJS $http.delete Request with Body and Headers

Hey so for POST/PUT requests simply doing $http.post(url, body, headers) worked fine But with DELETE it gets my body, but completely ignores my headers... $http.delete(url, body, headers)
Patrick Duncan
  • 549
  • 1
  • 6
  • 17
6
votes
3 answers

HttpClient.SendAsync not sending request body

I am using the ASP.NET Web API Client Libraries for .NET 4.0 (Microsoft.AspNet.WebApi.Client version 4.0.30506.0). I need to send an HTTP DELETE with a request body. I have coded it as follows: using (var client = new HttpClient()) { …
Philippe
  • 4,088
  • 4
  • 44
  • 49
6
votes
4 answers

Delete All List Items Sharepoint 2013 REST

I need to delete all the Items in a Sharepoint List using REST API. How can I achieve this? I can delete a single Item using: "/_api/web/lists/getByTitle('MyList')/items('ID')" I tried to remove the ID but it did not work.
Nk SP
  • 822
  • 4
  • 19
  • 37
6
votes
1 answer

Should I return a 410 Gone in response to a successful HTTP DELETE request?

I'm implementing DELETE support on a ReST API (build on ServiceStack) and wondering what response code to return following a successful DELETE. HTTP defines 410 as: The requested resource is no longer available at the server and no forwarding…
Dylan Beattie
  • 53,688
  • 35
  • 128
  • 197
6
votes
1 answer

Slim Framework - jQuery $.ajax request - Method DELETE is not allowed by Access-Control-Allow-Methods

I am trying to use a REST API written in Slim Framework. Get & Post methods work without any problem. But DELETE requests doesn't work. I get "Method DELETE is not allowed by Access-Control-Allow-Methods" I have already allowed OPTIONS aswell as…
Riz
  • 6,746
  • 16
  • 67
  • 89
6
votes
2 answers

mod_rewrite: How to redirect HTTP DELETE and PUT

Im trying to write a little rest api in php by using mod_rewrite. My question is: How do I handle HTTP DELETE and PUT? For example, the url would be: /book/1234 where 1234 is the unique id of a book. I want to "redirect" this id (1234) to book.php…
sockeqwe
  • 15,574
  • 24
  • 88
  • 144
5
votes
3 answers

Does Symfony2 handle restful url properly and should I use restful url?

I'm trying to figure what is the best way to design my urls. So here is what I have done so far: account_index: pattern: /Accounts/ defaults: { _controller: "CoreBundle:Account:index" } requirements: { _method: get } account_create: …
Jean-Philippe Leclerc
  • 6,713
  • 5
  • 43
  • 66