0% found this document useful (0 votes)
10 views3 pages

Day 2 POST, PUT & DELETE Requests - Making Things Happen

This document provides a guide on how to perform POST, PUT, and DELETE requests using JSON in API development. It explains the purpose of each method, offers examples for sending requests, and emphasizes the importance of setting the correct headers. Additionally, it includes pro tips for effective usage of these methods in Postman.

Uploaded by

deepghinaiya12
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
10 views3 pages

Day 2 POST, PUT & DELETE Requests - Making Things Happen

This document provides a guide on how to perform POST, PUT, and DELETE requests using JSON in API development. It explains the purpose of each method, offers examples for sending requests, and emphasizes the importance of setting the correct headers. Additionally, it includes pro tips for effective usage of these methods in Postman.

Uploaded by

deepghinaiya12
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

Day 2: POST, PUT & DELETE Requests – Making Things

Happen
Created by: Deep Ghinaiya
Software Developer
linkedin.com/in/deep-ghinaiya

What You’ll Learn:

• How to send POST requests with a JSON body

• Use PUT to update existing data

• Send DELETE requests to remove data

• Set required headers like Content-Type: application/json

• Understand the structure of request bodies and endpoints

What Are These Methods?

• POST → Create new data (e.g., new user, new blog post)

• PUT → Update existing data

• DELETE → Remove data from the server

🛠 Let’s Try a POST Request

Endpoint:

https://jsonplaceholder.typicode.com/posts

Method:

POST

Headers:

Content-Type: application/json
Body (raw - JSON):

"title": "Mastering Postman",

"body": "This is a test post using Postman.",

"userId": 1

Click Send → You’ll get a response with a 201 Created status and the new post data.

PUT & DELETE Examples

PUT (Update):

• URL: https://jsonplaceholder.typicode.com/posts/1

• Method: PUT

• Body: (change title/body content)

DELETE:

• URL: https://jsonplaceholder.typicode.com/posts/1

• Method: DELETE

• No body required

• You'll get a 200 OK or 204 No Content status

Pro Tips:

Always set Content-Type: application/json when sending JSON


You can reuse previous request bodies using Postman's History tab
Check the status code — it tells you if the operation succeeded
Use POST for new data, PUT for updates, PATCH for partial updates
Full Series:
github.com/Ghinaiya-Deep/Skill-Stack-by-DeepLogic-Labs

Found this helpful? Star the repo and share it with fellow devs!

You might also like