Questions tagged [http-delete]

The DELETE method is an HTTP request used to remove a specific resource from the server.

The HTTP DELETE request encountered a TypeError, stating that error.json is not a valid function

Within my Angular application, there is a feature that involves a "delete button". When this button is clicked, a confirmation popup appears asking the user if they are certain they want to proceed with the deletion. If the user confirms by clicking 'yes', ...

REST API Express - DELETE Endpoint

I'm facing an issue with the delete functionality in my API. In order to use my application, a user must log in and then they can add courses. These courses are stored in a nested array within the User model. I want users to be able to remove (delete) ...

Remove Request (MongoDB, express, handlebars)

Struggling with implementing a delete request in my application. I have a database filled with reviews that I manipulate through my app. Currently, I'm attempting to create a function that will remove a document from the database and then redirect th ...

I am experiencing difficulty deleting a post due to unknown errors. Is there a way to successfully remove data from the database using the DELETE command?

Here are the two issues I'm encountering. MongooseError [CastError]: Casting to ObjectId has failed for value "{item._id}" at path "_id" for the model "Post" Second Error stringValue: '"{item._id}"', kind: 'ObjectId', value: '{item._id}', path: '_ ...

I keep receiving a 400 (Bad Request) error when trying to delete with my REST API

I've successfully created an API and have managed to make POST and GET requests work flawlessly. However, I'm facing some trouble with the DELETE request. Every time I try to execute it, I encounter a 'DELETE http://localhost:3000/api 400 (Bad Request)' er ...

Redirecting successfully after a 'delete' action in Express

When working from the client side, I am using jQuery to make an Ajax request of type "delete". On the server side, I am executing a res.redirect(URL) command. However, instead of redirecting as expected, the browser is making another delete request with ...

Trouble arises when attempting to remove an object using a combination of Node.JS, Mongoose, MongoDB, and

In my setup, I have two collections: one is called subcategories and the other is called categories. The categories collection includes a field known as subcategories which is an array containing the ids of the subcategories from the subcategories collecti ...