In this express tutorial we will see how to create a delete request? The construction of the service is similar to express GET service, except the verb is “delete”. Let us take a look at the below example where we are creating a delete service using express.

Example Code – Express Delete

var express = require("express");
var app = express();
app.delete('/student',function(req,res){
	res.send("Inside Delete Request");
});
app.listen(8080);

Run the above code and invoke a delete request against the url http://localhost:8080/student using a tool like Postman. You will get the response as below.

express delete

Express Delete Request Example