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

Jersey test - Http Delete method with JSON request

I am using Jersey Test to test Rest service DELETE method: @DELETE @Path("/myPath") @Consumes(MediaType.APPLICATION_JSON) @Produces(MediaType.APPLICATION_JSON) public MyResponse myMethod(MyRequest myRequest) { I have tried the example below and…
Justinas Jakavonis
  • 8,220
  • 10
  • 69
  • 114
2
votes
1 answer

How to NAVIGATE to address synchronously with PUT or DELETE request with javascript or jQuery?

How to issue request PUT /user/someuser1 and parse result in browser? Note that AJAX solution in this answer https://stackoverflow.com/a/2153931/258483 does something different: it passes the answer to closure function, while I need synchronous…
Dims
  • 47,675
  • 117
  • 331
  • 600
2
votes
1 answer

django rest framwork - delete object, its ManyToMany fields and objects with foreign keys to it

Here are my models: class Ride(models.Model): driver = models.ForeignKey('auth.User', related_name='rides_as_driver') destination = models.CharField(max_length=100, default='') leaving_time=models.TimeField() …
Ofek Agmon
  • 5,040
  • 14
  • 57
  • 101
2
votes
1 answer

HttpDelete a parameter with setEntity on android?

I try to delete a parameter with this : private class SendfeedbackDeleteStudio extends AsyncTask { private static final String LOG_TAG = "DeleteStudio"; Bundle extras = getIntent().getExtras(); final String token=…
2
votes
2 answers

Facebook Api v2.1 - Link Delete not working

I'm using Facebook Api v2.1 and i came across a weird situation. I'm creating a new feed using /{UserId}/feed with POST. So far so good. I can even delete that post with /{PostId} and DELETE method The problem is when i create a feed with a link and…
2
votes
1 answer

java spring MVC, REST Delete method after clicked a link

I am creating a web page that allows the user to add new addresses, delete, and update the address list. My "add new address" is working, however "delete address" is not working. Please check below my interface design for better understanding, help…
Ah Hiang
  • 592
  • 6
  • 13
2
votes
0 answers

Retrofit: no body on HTTP DELETE response only for cellular networks

I have HTTP DELETE API endpoint with some body in response. If I try to send that request over wi-fi network, I get complete response: HTTP headers and response body. After switching off the wi-fi and sending the request over cellular network, I…
2
votes
3 answers

Windows server how to send a HTTP delete method

I am working with Couchbase, and I want to delete a bucket. According to the official page I should do this: To delete buckets, use the DELETE /pools/default/buckets/[bucket-name] HTTP method and URI. I am working on Windows server 2012 and this…
Marco Dinatsoli
  • 10,322
  • 37
  • 139
  • 253
2
votes
1 answer

403 error on HTTP Delete Django

I am using Django and Django Rest Framework. When i used this view to delete user review on django server its working. @api_view(['GET','POST','DELETE']) @permission_classes((IsAuthenticated,)) def user_reviewrating(request,websitename): …
Ashish Gupta
  • 2,574
  • 2
  • 29
  • 58
2
votes
4 answers

WEB API 2 Delete returns 405

I'm trying to do create a delete function in my web API class. I had problems earlier with using the Put and Patch Http messages since these were being linked to WebDAV. After changing this the Patch and Put worked but the Delete is giving me…
VeldMuijz
  • 605
  • 5
  • 18
2
votes
1 answer

How does delete operation work with Rest in Spring Data

Currently we have exposed our methods like this @RestController @RequestMapping("/app/person") public class PersonResource { @Timed public void delete(@PathVariable Long id) { log.debug("REST request to delete Person: {}", id); …
user721025
  • 172
  • 5
  • 15
2
votes
0 answers

Django csrf token invalid after modifying request

I am trying to do POST tunneling on my Django website. What I am basically trying to do is to "enable" PUT and DELETE. So, now I am struggling with DELETE. In my template.html I have the following:
darxsys
  • 1,560
  • 4
  • 20
  • 34
2
votes
3 answers

Send PUT, DELETE HTTP request in HttpURLConnection

I have created web service call using java below code. Now I need to make delete and put operations to be perform. URL url = new URL("http://example.com/questions"); HttpURLConnection conn = (HttpURLConnection)…
manitaz
  • 1,181
  • 2
  • 9
  • 26
2
votes
1 answer

Express hanging in Chrome post AJAX delete

When issuing a same-origin AJAX delete via jQuery, subsequent calls to the server via the same client are hanging. I've excerpted the problem below. Please advise if something is malformed as this would seem like such a strange bug. Using Express…
2
votes
1 answer

DELETE Realtime Subscriptions in Instagram

The endpoint for deleting realtime subscriptions seems to have stopped working. I'm performing a cURL 'POST' with a 'DELETE' custom request and receiving the following JSON response from Instagram: {"meta":{"code":200},"data":null} However, the…