👑 Premium Sign in Sign up

CSE23 · Web, API & secure coding

Tiny Weather Mock API

A weather API for Indian cities, with query parameters, validation errors and caching headers.

📶 L200⏱ 30 min🧪 Live lab

🎯 You will learn to

  • Use query parameters
  • Handle 400 and 404
  • Read Cache-Control

🧪 Live environment

Runs entirely in your browser: nothing is installed, no real cloud account is used and your code is never sent to our server.

Loading the lab…

✅ Steps & checkpoints

🗺️ Weather API with caching

Query parameters are validated; a cached answer is returned with Cache-Control until it expires.

Weather API with cachingQuery parameters are validated; a cached answer is returned with Cache-Control until it expires.App/weather?city=PuneValidatecity, unitsCachemax-age 600ForecastserviceMockreadings400unknown citybadhit?missstorePerson / clientAPI / gatewaySecurity controlData storeComputeApp / UI

The 2D diagram shows the exact flow, ports and trust boundaries. The 3D scene is a concept view of the same parts; packets travel along the same arrows.

🤔 Think about it

What should a client do with a 429 Too Many Requests?

🛡️ Safety & cost

The APIs are mocks inside this page. Identities and data are fictional.

🧹 Cleanup

Nothing to clean up.

📚 Reference documents

Official sources, checked on 5 Nov 2026. Cloud services change often; check the official page before relying on a feature. All references