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
4 answers

REST API delete HTTP request in Spring Boot

I'm learning REST API. I'm trying to delete an element from the list. I tried but getting an error on the postman. Can anyone help me where I went wrong? Also, can we return the object after deleting it? I also tried it but I think I'm messing up in…
Ryuk
  • 43
  • 1
  • 1
  • 6
1
vote
1 answer

Google Cloud Run unlogged 502 responses for DEL requests

I have created a very simple Google Cloud Run Python service to experiment with Restful APIs: import os from flask import Flask app = Flask(__name__) @app.route('/user/', methods=['PUT']) def create_user(user_name): return…
prl900
  • 4,029
  • 4
  • 33
  • 40
1
vote
0 answers

Rest Api Support for Deleting an Airflow Dag

After migration from airflow version 1.10.9 to 1.10.13rc1 The Rest API for Deleting a dag doesnt seem to Work The Rest API I am using is : curl --location --request DELETE '/api/experimental/dags/' I get a 404 error response for this , the…
Vidya Shree
  • 81
  • 1
  • 7
1
vote
1 answer

passing a body containing a json array of items for delete in angular

I have a REST API as below which is using the HTTP DELETE method. I have to pass this body in that HTTP DELETE method in Angular. Please help. I cannot change the structure of this body { "transactions": [ { "eventId": "21012200237172", …
learnerNT
  • 9
  • 4
1
vote
2 answers

DELETE with Express.JS

I am trying to get my DELETE method to work. When the function is ran it is going straight into the throw Error line. In the console it is printing the following two errors. “404 Not Found” “Error Uncaught (in promise) Error" Here is my client side…
1
vote
2 answers

Why does sending a delete request trigger the get_queryset() Django method?

I am having trouble sending a delete request from axios to my Django backend. With axios I call delete in the following way for many of my models: // DELETE DAY export const deleteDay = (day_id) => (dispatch, getState) => { axios …
FlamePrinz
  • 490
  • 1
  • 5
  • 20
1
vote
0 answers

DELETE https://localhost:44382/Admin/stocks 404 spread.js:25

Im stuck, i tried everything, cant find it please help me... Console: DELETE https://localhost:44382/Admin/stocks 404 spread.js:25 code: deleteStock(id, index) { this.loading = true; axios.delete('/Admin/stocks' + id) …
Tim Mons
  • 11
  • 1
1
vote
1 answer

Problem in deleting object using Node.JS, Mongoose, MongoDB, and Express

I have a collection called subcategories, another collection called categories the collection categories has a field called subcategroies. It's an array that has the ids of the subcategories from the subcategories collections.. I have an endpoint…
OmarYehiaDev
  • 153
  • 1
  • 8
1
vote
1 answer

How to perform multiple HTTP DELETE operation on same Resource with different IDs in JMeter?

I have a question regarding **writing test for HTTP DELETE method in JMeter using Concurrency Thread Group**. I want to measure **how many DELETEs** can it perform in certain amount of time for certain amount of Users (i.e. Threads) who are sending…
NikolaS
  • 503
  • 2
  • 8
  • 20
1
vote
2 answers

Delete method rails 6

I made a web application that allows the user to add edit and delete an article. The problem I'm having is that the delete method does not work. When I click "Delete" beside the article that i want to get rid off nothing happens, I don't get any…
Eoin
  • 252
  • 2
  • 15
1
vote
3 answers

Cannot call API DELETE in ASP.NET core when running my tests (405 Method Not Allowed) . BUT it works in swagger

Maybe there are some sort of permissions I need to set up in the test webhost ? The Get and Post for the tests work fine. But get a HTTP 405 error when it tries to call the DELETE method on the controller. [HttpDelete("{id:int}")] public…
punkouter
  • 5,170
  • 15
  • 71
  • 116
1
vote
1 answer

Resource blocked due to MIME type in Spring MVC when DELETE endpoint added

I'm developing a web app using Spring Boot v2.1.9.RELEASE and Thymeleaf. The app mixes server-side rendering (Spring MVC regular controllers) with rest controllers called through AJAX. The page works like a charm as long as GET and POST are the only…
1
vote
2 answers

JWT must be provided - Delete method returning token as null instead of user token

I have issue as title say. I will show you code in NodeJS. Request is blogRouter.delete controllers/blog.js (only delete method) const blogsRouter = require('express').Router() const jwt = require('jsonwebtoken'); const Blog =…
Veljko Kukic
  • 107
  • 1
  • 4
  • 12
1
vote
2 answers

How to implement React HTTP delete requests without an ID?

When IDs are generated in a server for documents, how can the frontend send HTTP Delete requests properly? Since HTTP Delete requests require a document's ID to route to the server, but IDs are generated in the server, how can the frontend know the…
Brendan
  • 752
  • 1
  • 8
  • 21
1
vote
1 answer

Django IndexError: pop from empty list within DeleteView

I am trying to delete an Object from the database of my Django app. The idea is to get the primary from the html file and post it in a form. I am not understanding how I should pass the primary key to post my delete request in the correct way. I…