RelationDigest

Friday, 4 August 2023

[New post] How to send PATCH Requests in Postman?

Site logo image vibssingh posted: " HOME In this tutorial, we will send a request performing the PATCH method in Postman. Table of Contents What is PATCH method? Implementation Steps Create a Collection Add a request to the Collection Enter the details of reques" QA Automation Expert

How to send PATCH Requests in Postman?

vibssingh

Aug 4

HOME

In this tutorial, we will send a request performing the PATCH method in Postman.

Table of Contents

  1. What is PATCH method?
  2. Implementation Steps
    1. Create a Collection
    2. Add a request to the Collection
    3. Enter the details of request
    4. Verify the Response
      1. Status
      2. Body
      3. Format Type
      4. Headers

What is PATCH method?

 The PATCH method is used to partially modify an existing resource. This operation updates an existing resource but does not require sending the entire body with the request. PUT modifies a record's information and creates a new record if one is not available, and PATCH updates a resource without sending the entire body of the request.

We will use the following URL for this Postman tutorial.

 https://reqres.in/api/users/2 

Sample Request Body

 {     "name": "Patch_Test" } 

Implementation Steps:

To create the first PATCH 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.

Step 2:  Provide a name to the collection - "API Testing".

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".

Step 4: Once you create a new request, then you will get the following window:

Enter the details of request

Step 5: Enter the "name" in the request. Here, the name is "PartiallyUpdateUser".

Step 6: Enter the "URL" in the address bar.

Step 7: Now, select the "PATCH" request from the list of request methods.

Step 8: Add a Request body to the Post request

For this, select the Body tab.

Now in the Body tab, select raw and select JSON as the format type from the drop-down menu, as shown in the image below. This is done because we need to send the request in the appropriate format that the server expects. Copy and paste the request body example mentioned at the beginning of the tutorial to the postman request Body. 

Step 9: Press the "Send" button.

Verify the Response

Step 10: 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.

Status

You can check the status code. Here, we got the status code 200, which means we got a successful response to the request. In the case of new resource creation, the status code should be 201. But as this is a dummy API, we are getting a status code of 200.

Body

In the Body tab of the response box, we have multiple options to see the response in a different format.

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

HTML

Text

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:

We are done! Congratulations on making it through this tutorial and hope you found it useful! Happy Learning!!

Comment
Like
Tip icon image You can also reply to this email to leave a comment.

Unsubscribe to no longer receive posts from QA Automation Expert.
Change your email settings at manage subscriptions.

Trouble clicking? Copy and paste this URL into your browser:
http://qaautomation.expert/2023/08/04/how-to-send-patch-requests-in-postman/

WordPress.com and Jetpack Logos

Get the Jetpack app to use Reader anywhere, anytime

Follow your favorite sites, save posts to read later, and get real-time notifications for likes and comments.

Download Jetpack on Google Play Download Jetpack from the App Store
WordPress.com on Twitter WordPress.com on Facebook WordPress.com on Instagram WordPress.com on YouTube
WordPress.com Logo and Wordmark title=

Automattic, Inc. - 60 29th St. #343, San Francisco, CA 94110  

at August 04, 2023
Email ThisBlogThis!Share to XShare to FacebookShare to Pinterest

No comments:

Post a Comment

Newer Post Older Post Home
Subscribe to: Post Comments (Atom)

Welcome to Letters from the Mire

Welcome, all from Wordpress and beyond! ͏     ­͏     ­͏     ­͏     ­͏     ­͏     ­͏     ­͏     ­͏     ­͏     ­͏     ­͏     ­͏     ­͏     ­͏ ...

  • [New post] Wiggle Kingdom: April Earnings on Spring Savings!
    Betsi...
  • [New post] Balancing the ‘E’ and ‘S’ in Environment, Social and Governance (ESG) crucial to sustaining liquidity and resilience in the African loan market (By Miranda Abraham)
    APO p...
  • Something plus something else
    Read on bl...

Search This Blog

  • Home

About Me

RelationDigest
View my complete profile

Report Abuse

Blog Archive

  • August 2025 (38)
  • July 2025 (59)
  • June 2025 (53)
  • May 2025 (47)
  • April 2025 (42)
  • March 2025 (30)
  • February 2025 (27)
  • January 2025 (30)
  • December 2024 (37)
  • November 2024 (31)
  • October 2024 (28)
  • September 2024 (28)
  • August 2024 (2729)
  • July 2024 (3249)
  • June 2024 (3152)
  • May 2024 (3259)
  • April 2024 (3151)
  • March 2024 (3258)
  • February 2024 (3046)
  • January 2024 (3258)
  • December 2023 (3270)
  • November 2023 (3183)
  • October 2023 (3243)
  • September 2023 (3151)
  • August 2023 (3241)
  • July 2023 (3237)
  • June 2023 (3135)
  • May 2023 (3212)
  • April 2023 (3093)
  • March 2023 (3187)
  • February 2023 (2865)
  • January 2023 (3209)
  • December 2022 (3229)
  • November 2022 (3079)
  • October 2022 (3086)
  • September 2022 (2791)
  • August 2022 (2964)
  • July 2022 (3157)
  • June 2022 (2925)
  • May 2022 (2893)
  • April 2022 (3049)
  • March 2022 (2919)
  • February 2022 (2104)
  • January 2022 (2284)
  • December 2021 (2481)
  • November 2021 (3146)
  • October 2021 (1048)
Powered by Blogger.