The api is hosted online. Here is the API link
Home page Response
{
"status":"success",
"message":"Welcome to Weather API"
}
Weather ( POST request ) /getWeather
Body
{
"value":"london"
}
Response (200)
{
"cod": 200,
"city": "London",
"ISO": "GB",
"weather": {
"id": 804,
"main": "Clouds",
"description": "overcast clouds",
"icon": "04d"
},
"main": {
"temp": 11.47,
"feels_like": 11.02,
"temp_min": 9.32,
"temp_max": 13.38,
"pressure": 1008,
"humidity": 90
}
}
Error Response (400)
{
"cod": "404",
"message": "city not found"
}
- Made with React and TailwindCSS
- CustomHooks
useDebounce
,useLocalStorage
anduseNetworkStatus
are used from usehooks.com