How to perform DELETE requests in Postman?
Last Updated :
17 Dec, 2023
Postman is an API(application programming interface) development tool which helps to build, test and modify APIs. It can make various types of HTTP requests(GET, POST, PUT, PATCH), save environments for later use, and convert the API to code for various languages(like JavaScript, and Python). In this article, we will learn how you create and send GET requests in Postman.
Prerequisites:
- Basic HTTP concepts
- Knowledge of REST API
Steps to perform DELETE requests in Postman
Step 1: After downloading and installing the Postman, open the software. Add a new Collection and give it a name like “GFG”.
Step 2: When you hover, on the name of your collection, 3 dots will appear. Click on those 3 dots, and then click on “Add new request”
Step 3: You need select “DELETE” request from the dropdown down menu as shown below
Step 4: Now You can simply paste the API in the space provided and click on Send. Output will be shown in the body with the status code; 200 (OK Deleted). Note: You will to pass the id of the object to be deleted .
How to pass id:
Lets suppose , our object id is Text. Then select “Body -> raw -> Text” as shown below
Step 5: After this hit the Send button.
Example
Lets suppose we can an API
https://dummyjson.com/posts/
We will send a DELETE request, with an object id=1
Output:
Share your thoughts in the comments
Please Login to comment...