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
2
votes
1 answer

DELETE request with file_get_contents

file_get_contents method can do a GET or POST request. I am wondering if it is possible to do a DELETE request with this method. I tried like below but it doesn't seem to do a DELETE Request. I am also not getting any error or exception. Is this…
user1346107
  • 157
  • 4
  • 11
2
votes
0 answers

Can someone provide complete working Rest API Sample request to add & delete objects in amazon s3 bucket?

I want to delete files and folder from the Amazon s3 bucket. Below is my request, but its not working. $.ajax({ type: "POST", dataType: "jsonp", url: "http://s3.amazonaws.com/bucketname/", beforeSend:…
prajakta
  • 21
  • 2
2
votes
2 answers

Perform HTTP DELETE with api address and json data using java

I know that to send a POST request to the web I can use this syntax: HttpPost post = new HttpPost(api_address); String response = null; int status_code = -1; StringEntity se = new StringEntity(json_data, HTTP.UTF_8); …
Camilla
  • 949
  • 2
  • 14
  • 26
2
votes
0 answers

Causes for HttpDelete header field 'x-method' missing error

Please help me understand the possible causes of an 'x-method' missing error when using HttpDelete. There is a Windows 7 user using Chrome 23 but HttpDelete isn't working. This test website http://www.mnot.net/javascript/xmlhttprequest/ reports the…
Mindy
  • 21
  • 1
  • 4
2
votes
1 answer

How to send DELETE request with body in Apache CXF JAX-RS with webclient?

I want to call webclient.delete(deleteBody) similar to POST. WebClient client = WebClient.create(getUrl()); client = client.type("application/json").accept("application/json"); HTTPConduit conduit =…
user1799236
  • 21
  • 1
  • 2
2
votes
3 answers

java servlet delete not redirecting

I have a simple servlet page that pushes to a jsp page, when you select the record you want, it is supposed to delete it from the database and reload the page. However what happens is in the console it prints the correct sql delete statement but it…
user1393064
  • 401
  • 1
  • 16
  • 41
2
votes
1 answer

DELETE http method with REST API using PHP

I'm working on making a small application just to get the hang of REST and I'm having some trouble with the DELETE method. I've never used it before so I'm not sure how it behaves. Anyway, I followed this tutorial to get a hang of the basics. I…
user1104854
  • 2,137
  • 12
  • 51
  • 74
2
votes
1 answer

jQuery CORS delete fails

I have two domains: accounts.example.org app.example.org Now I want to do a HTTP DELETE request from app.example.org to accounts.example.org/session. $.ajax({ url: "http://accounts.example.org/session", type: "DELETE" }); Nothing really…
bodokaiser
  • 15,122
  • 22
  • 97
  • 140
2
votes
2 answers

Why does HTTP delete need javascript to work?

I was working with Devise in Rails and while setting up the sign_out function I run into errors. I noticed than, it happened because pages which have sign_out link skipped layouts so Javascript was inactive. By enabling javascript with:` <%=…
Barbared
  • 800
  • 1
  • 8
  • 25
2
votes
3 answers

Why am I getting "No route matches [GET]" on a "delete" request? Ruby on Rails

When I try to delete the content of a communityfeed_item/micropost I get the following error: Routing Error No route matches [GET] "/microposts/45" Try running rake routes for more information on available routes. I check my routes and see a…
Laser
  • 5,085
  • 4
  • 34
  • 48
1
vote
3 answers

How to delete SOLR indexed data by datetime field query with curl?

I have a datetime field like that. I try to delete some specific dates on rel_date field by curl query. curl…
Guray Celik
  • 1,281
  • 1
  • 14
  • 13
1
vote
1 answer

How to create a "DELETE" link in play2?

Play2 supports restful url, we can define in "routes" file: DELETE /users/:id controllers.Users.delete(id) But how do I create such a link in template? Is there a helper method to use, or do I have to add a special parameter in the url?
Freewind
  • 193,756
  • 157
  • 432
  • 708
1
vote
1 answer

Is MonoTouch or the iOS web stack eating my HTTP DELETE request body?

I am using MonoTouch to call a remote web service from an iOS app. I use HttpWebRequest and it works great for me for GET, PUT, and POST requests. However, when I try to make a DELETE request, I get some odd behavior: the entity body that I send…
Omri Gazitt
  • 3,428
  • 2
  • 21
  • 27
1
vote
1 answer

MVC 3 Razor Ajax HttpDelete IIS6

I'm trying to execute a delete request via jQuery to a controller. Locally it works but when deployed to the server I receive a 501 status. I have confirmed that for .cshtml that all verbs are accepted and that file verification is not needed (I…
rashleighp
  • 1,226
  • 1
  • 13
  • 21
1
vote
1 answer

HTTP DELETE always returns a HTTP/400 error message

I tried doing a HTTP DELETE by the below code, but always received an error message of Status 400, I wanted to know if I had done sonething wrong. I'm not too sure whether I need to use 'httpCon.getInputStream();' import java.io.IOException; import…
Winz
  • 237
  • 3
  • 6
  • 14