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
1
vote
1 answer

Sending ACK after consuming the result of a RESTful web service?

Consider a queue of items on server. The client then reads 10 queued items at a time using a REST web service. Naturally, when the client has consumed these items the server should remove them server-side. Q: What is the best approach if we consider…
l33t
  • 18,692
  • 16
  • 103
  • 180
1
vote
1 answer

Blazor server, call api controller delete/{filename} to delete file. 404 response

I have an api that works in most functions, but not on my HttpDelete where I got 404 response. [Route("/[controller]")] [ApiController] public class UploadController : ControllerBase .. [HttpDelete("delete/{filename}")] …
1
vote
0 answers

PUT and DELETE Request with Content Type "multipart/form-data" in cypress

I'm a test-developer working on cypress API testing for the first time. I was asked to test 3 APIs with content type "multipart/form-data". The first one I needed to test it as a POST, but instead the second and the third ones respectively as a PUT…
Cassia
  • 11
  • 3
1
vote
0 answers

delete request fron the frontend to the backend is not working

My data at backend [ { id:1, Name: "Isabella of Portugal", Spouse: "Charles V", Title: "Holy Empire Empress", Introduction:"Isabella of Portugal (24 October 1503 – 1 May 1539) was the empress…
Anee go
  • 65
  • 5
1
vote
2 answers

How can I delete a post using its ID and the permission (access Token) on Facebook?

I have created a Facebook application that has the permission to post on wall, has offline access, and can store access tokens in the database. The application only needs you to go to canvas page once, and then it will start serving you a "post"…
Shady Keshk
  • 540
  • 6
  • 16
1
vote
1 answer

Spring REST DELETE example error

I want to implement Spring REST methods. I tried Get and it works: @RequestMapping(value = "{systemId}", method = RequestMethod.GET) public @ResponseBody Configuration getConfigurationInJSON(HttpServletResponse response, @PathVariable…
kamaci
  • 72,915
  • 69
  • 228
  • 366
1
vote
2 answers

Spring @DeleteMapping results in 405

I have an abstract crud controller which has a GetMapping and DeleteMapping on the same path which uses pathvariables. Both HttpMethods are defined on the same path and are without body. The GET works perfectly fine, but for the DELETE i am getting…
Notedop
  • 81
  • 1
  • 8
1
vote
2 answers

Java http delete request to delete an item from a repository

I am trying to create java code to delete an item from a repository in a spring boot server using the item's ID. My server code: @DeleteMapping("/deleteUser/{id}") public void deleteUser(@PathVariable Long id){ …
1
vote
2 answers

ASP.NET Core routes GET call to DELETE method

I have an ASP.NET Core web API controller with (among others) two methods that have the same signature. Shortened down, this looks as follows: [Route("my/route")] public class MyApiController : ApiController { [HttpGet("{*id}", Order = 2)] …
F-H
  • 663
  • 1
  • 10
  • 21
1
vote
1 answer

Return Https Status Code 410 Error for all Website Pages

I want to return 410 errors from my whole website pages so how to do this in just a few lines of code. I have used this syntax Redirect 410 [page-path] in .htaccess file but it is just to block one page what if I want for the whole website? In doing…
1
vote
0 answers

Delete Request In a Directory HTTP Server Python

I was looking at this https://github.com/ImaginaryBIT/Python_HTTP_Server. It is a website with a directory that allows you to get, put, and post files to/from the directory. I am trying to modify it to have a delete request. I am having some trouble…
JackLalane1
  • 177
  • 10
1
vote
0 answers

Can't delete or edit item with http delete/put request

I am making an e commerce site as a project, but I have issues with the POST and DELETE Requests. I have made a function to list all products from the database. When I click edit the function works, it puts the respective values to the input fields…
1
vote
0 answers

Why should we not return a response in an HTTP DELETE request?

At my company we have a DELETE endpoint which (obviously) deletes some data that the user selects on the client side. Currently we are doing another get request to refresh the data on this page after the deletion requests completes successfully (So…
serp002
  • 85
  • 8
1
vote
1 answer

React - How to get an id and use it to delete

So in react I made a button to delete some data so I need to get teh car by id and remove it by using react js axios so the response I got is an empty array so can some one help me please. Here is the code : in service data file : get(id) { …
user14407372
1
vote
0 answers

REST API deleting parent/child relationship vs deleting child object

I have a rest api with a type "Entity", this Entity has a list of children which themselves are also type Entity Accessing the resources is as follows: Get Children of an entity: GET /api/entities/{id}/children Get Single entity: GET…
Claude Hasler
  • 396
  • 1
  • 14