Last Updated On
In this tutorial, we will create DELETE request in Postman and see how to execute it.
Table of Contents
What is DELETE Request?
The HTTP DELETE method is used to delete a resource from the server. Unlike GET requests, the DELETE requests may change the server state.
The DELETE method is defined to be idempotent, which means that sending the same HTTP DELETE request multiple times will have the same effect on the server and will not additionally affect the state or cause additional side effects.
We will use the following URL for this Postman tutorial.
https://dummy.restapiexample.com/api/v1/delete/2
Implementation Steps
To create the first DELETE request in Postman, follow the following steps:
Create a Collection
Step 1: Create a Collection, click on Collections, and then click on the “+” plus button.
![](https://qaautomation.expert/wp-content/uploads/2023/06/image-92.png?w=512)
Step 2: Provide a name to the collection – “API Testing”.
![](https://qaautomation.expert/wp-content/uploads/2023/06/image-93.png?w=703)
Add a request to the Collection
Step 3: To create a new request, click on “Add a request” if it is a new Collection. Otherwise, click on the 3 dots and select “Add request”.
![](https://qaautomation.expert/wp-content/uploads/2023/06/image-115.png?w=342)
Step 4: Once you create a new request, then you will get the following window:
![](https://qaautomation.expert/wp-content/uploads/2023/06/image-95.png?w=1200)
Enter the details of request
Step 5: Enter the “name” in the request. Here, the name is “DeleteUser”.
![](https://qaautomation.expert/wp-content/uploads/2023/06/image-148.png?w=571)
Step 5: Enter the “URL” in the address bar.
![](https://qaautomation.expert/wp-content/uploads/2023/06/image-149.png?w=603)
Step 6: Now, select the “DELETE” request from the list of request methods.
![](https://qaautomation.expert/wp-content/uploads/2023/06/image-150.png?w=444)
Step 7: Press the “Send” button.
![](https://qaautomation.expert/wp-content/uploads/2023/06/image-151.png?w=1200)
Step 8: Once you press the send button, you will get the response from the server. Make sure you have a proper internet connection; otherwise, you will not get a response.
![](https://qaautomation.expert/wp-content/uploads/2023/06/image-152.png?w=739)
Verify the Response
Status
You can check the status code. Here, we got the status code 200, which means we got a successful response to the request.
![](https://qaautomation.expert/wp-content/uploads/2023/06/image-158.png?w=1049)
Body
In the Body tab of the response box, we have multiple options to see the response in a different format.
![](https://qaautomation.expert/wp-content/uploads/2023/06/image-153.png?w=538)
Format Type
Each request has a defined response to it as defined by the Content-Type header. That response can be in any format. Such as in the above example, we have JSON code file.
Below are the various format type present in Postman.
XML
![](https://qaautomation.expert/wp-content/uploads/2023/06/image-154.png?w=658)
HTML
![](https://qaautomation.expert/wp-content/uploads/2023/06/image-155.png?w=694)
Text
![](https://qaautomation.expert/wp-content/uploads/2023/06/image-156.png?w=663)
Headers
Headers are the extra information that is transferred to the server or the client. In Postman, headers will show like key-value pairs under the headers tab. Click on the Headers link as shown in the below image:
![](https://qaautomation.expert/wp-content/uploads/2023/06/image-157.png?w=1200)
Congratulations on making it through this tutorial and hope you found it useful! Happy Learning!! Cheers!!