Skip to content

Make Selenium Easy

And Keep It That Way

  • Home
  • Share
  • Toggle search form

API Testing Tutorial Part 5 – Safe Methods in HTTP Methods

Posted on 03/16/2025 By admin

Hello guys, 

In previous post, we have seen Introduction of HTTP methods. 

In this post, we will see what is called safe methods in HTTP methods. This is an important interview question also. 

All HTTP methods can be categorised in two categories: Safe methods & Unsafe methods. 

We know that all HTTP methods deal with resource. Some read the state of resource or some create/update the state of resource.  

If an HTTP method does not change/modify  the resource information on the server side or perform read only operation, is called a SAFE HTTP Method. The reason it is called as a safe method as it does not alter resource information and prevents actual resource state. GET, HEAD and OPTIONS HTTP methods are safe methods. This methods perform read only operations. POST, PUT etc are unsafe methods.

Suppose, you develop an API which gives current interest rate on saving account. This interest rate should be updated only by authorized people. If any normal employee wants to see interest rate, employee needs to hit that API which gives him current interest rate and he should not able to edit it in any way. That API should be a GET http method.

Safe methods are methods that can be cached, pre-fetched without any influence to the resource.

But it is also possible that a GET method can change resource on server side as it depends on developers how they create it.

More about API Testing in upcoming posts. Stay tuned.

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

Uncategorized

Post navigation

Previous Post: TestNG Tutorials 67 : Difference Between @Ignore & enabled Attribute of @Test Method in TestNG
Next Post: Part 11: Usages Of Javascripts In Selenium : How To Scroll To Any WebElement In Selenium WebDriver

Related Posts

March 5, 2019 – Make Selenium Easy Uncategorized
TestNG Tutorials 42: Parameters In TestNG or Parameterization of Methods in a TestNG Class | Make Selenium Easy Uncategorized
image – Make Selenium Easy Uncategorized
Frequently Asked Java Program 06: Print a Floyd Triangle of given number of rows Uncategorized
Setup of selenium project and How to open a chrome browser – 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