Skip to content

Make Selenium Easy

And Keep It That Way

  • Home
  • Share
  • Toggle search form

Postman Tutorial Part 52 – How To Send Parameterized XML Payload In Postman

Posted on 03/16/2025 By admin

As a part of Postman Tutorial – End to End , in this post, we will learn how can we send a XML payload and parameterized XML payload to request in Postman.

We can pass payload to a request in multiple ways. Sending XML payload is one of them. We also learnt how can we send a JSON and JSON with variables i.e. Parameterized JSON payload to a request.

We will be going to use RestFul-Booker Create Booking API for Demo. Create Booking API accepts JSON and XML payloads. We will create a booking by passing XML payload in Postman.

We can see header details and example request body in API documentation:-

Note :- We need to pass a header named “Content-Type” as “text/xml“. It is not supporting “application/xml“. In all latest APIs , you will see ” application/xml “. ” text/xml ” is superior of ” application/xml “.

Pass Create Booking API to URI section and add “Context-Type” header in Postman :-

Pass request body as XML :-

Click on Send button, and you will see a booking created.

So above are simple steps to pass a XML payload to request.

You can see we have passed all hard coded values in payload which is not always a good option. We can parameterized XML payload to pass values dynamically and achieve data driven as well.

Passing variables in XML payalod is same as we use variables at different places in Postman i.e. {{variableName}}. Let’s see this in action.

I will create an environment “Data Booking” in Postman and put all required values there and will use those variables in payload.

Let’s put variable names in XML payload as below:-

Select created environment file and hit “Send” key:-

Simple. It is similar to passing variables in JSON payload.

If you would like to see response in XML, set a header named “Accept” and set it as “application/xml”.

Hit the Send button and by default you will see response in XML :-

We will see extracting values from XML response in upcoming posts.

You can import example collection from here.

If you have any doubt, feel free to comment below.If you like my posts, please like, comment, share and subscribe.#ThanksForReading

#HappyLearning

Uncategorized

Post navigation

Previous Post: rest assured
Next Post: Test Your Basics of Selenium WebDriver – Java By Answering These Interview Questions

Related Posts

Is It Possible To Use Page Factory Without FindBy In Selenium WebDriver? | Make Selenium Easy Uncategorized
How To Open Duplicate Tab In Chrome Browser – Selenium WebDriver Uncategorized
PassBodyToPostReq – Make Selenium Easy Uncategorized
TestNG Tutorials 47: Marking a Parameter as Optional in TestNG Uncategorized
How to handle StaleElementReferenceException Through Page Object Model – PageFactory – Make Selenium Easy Uncategorized
image – Make Selenium Easy Uncategorized

Recent Posts

  • Getting Started with Selenium 4: What Is New and How to Upgrade from Selenium 3
  • Manual Testing
  • Baby Steps To Become Efficient Selenium-Java Automation Tester
  • Features of Selenium 4.0.0 Release – Java Binding
  • Part 1: Handling Drop-down Created Using SELECT Tag In Selenium

Recent Comments

No comments to show.

Archives

  • April 2026
  • April 2025
  • March 2025
  • February 2025
  • January 2025
  • December 2024
  • November 2024
  • October 2024
  • September 2024
  • August 2024
  • April 2024
  • March 2024
  • February 2024
  • December 2023
  • October 2023
  • August 2023
  • November 2022
  • September 2022
  • August 2022
  • July 2022
  • May 2022
  • March 2022
  • October 2021
  • April 2021
  • March 2021
  • January 2021
  • December 2020
  • October 2020
  • September 2020
  • August 2020
  • June 2020
  • May 2020
  • April 2020
  • March 2020
  • February 2020
  • January 2020
  • December 2019
  • November 2019
  • October 2019
  • September 2019
  • August 2019
  • May 2019
  • December 2018
  • November 2018
  • October 2018
  • September 2018
  • August 2018
  • July 2018
  • January 2018

Categories

  • Getting Started
  • Uncategorized

Copyright © 2026 Make Selenium Easy.

Powered by PressBook Masonry Dark