Skip to content

Make Selenium Easy

And Keep It That Way

  • Home
  • Share
  • Toggle search form

API Testing Tutorial Part 13 – What is a Payload in an API?

Posted on 02/19/2025 By admin

As a part of our API Testing series, in this post, we will learn about an important terminology of API called “Payload”.

Take a real-time scenario. A typical example of a Restaurant. A restaurant serves foods of different cuisines. It may be north Indian, south Indian, Chinese, Italians, etc. Everyone who visits the restaurant will be served on their choice. But there will be a pattern:-

  1. Visit restaurant
  2. Connect with a Waiter.
  3. Give instructions to the waiter.
  4. You will be served as requested food.

The waiter works on specific instructions. If you want a north Indian cuisine food you need to give instructions to a waiter or if you want a south Indian cuisine food you need to give instructions to the waiter. A waiter can not decide what food you want. Similarly, an API works on instructions or Payload.  Foods are resources, a waiter is an API and instructions are payloads at high levels here. So how you will be served depends on what you instruct.

When we launch the Facebook URL then we need to log in with our specific credentials. In response, the Facebook server will return back with the requested user’s profile details. It is a two-way process. Payload as request and payload as a response. Request payload is sent from client to server and response payload is sent from server to client.

There are many ways of providing payload to an API. It may be a JSON, XML, HTML, TEXT, etc but all serve the purpose of giving instruction to an API with different representations.

If we see a Create Booking API of RestFul Booker, you can see how this accepts the same information in two different formats.

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 Tutorial 19 – Default Host And Port in Rest Assured
Next Post: How to validate paste disabled input box using Selenium WebDriver

Related Posts

Make Selenium Easy – Page 25 Uncategorized
Amod Mahajan, Author at Make Selenium Easy – Page 50 of 50 Uncategorized
Which Locator To Use? Read This Post. Uncategorized
learn with quiz Uncategorized
Protractor Tutorial 4 – Introduction To Protractor Test Tool & How It Works Uncategorized
TestNG Tutorials 68 : Rerun Failed Test Method Using IRetryAnalyzer Interface – Implement Using retryAnalyzer attribute in the @Test annotation 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