- Dec 05, 2019
- admin
- 0
Create a New Request in Postman
- Click on “New” -> “Request” menu item
- Enter some meaningful name in “Request name” field.
Ex: GetWeather_Hyderabad
- Click on “+Create Collection” link
- Enter some meaningful collection name
Ex: Weather_Collection
- Click on “Save to Weather_Collection”
- Verify that “Weather_Collection” is displayed in left navigation
- Expand “Weather_Collection” by clicking on “Arrow” icon before “Weather_Collection” name
- Click on “GetWeather_Hyderabad” request name
- Enter the request URL.
http://restapi.demoqa.com/utilities/weather/city/Hyderabad
In this example we are trying to get the weather details for city: Hyderabad. So select the “GET” method from the dropdown.
- Click on “Save” button to save the request.
- Click on “Send” button.
- Verify the following factors from API response.
- Status should be “200 OK”
- “City” value should be “Hyderabad”
{
“City”: “Hyderabad”,
“Temperature”: “20.38 Degree celsius”,
“Humidity”: “83 Percent”,
“WeatherDescription”: “mist”,
“WindSpeed”: “1.74 Km per hour”,
“WindDirectionDegree”: “108 Degree”
}