Careeroza
Real World Example
How a Food App Uses REST
When you open Swiggy or Zomato and place an order, the app makes REST calls similar to these:
App opens GET /restaurants?lat=12.97&lng=77.59&page=1 -> 200 list
Open restaurant GET /restaurants/981/menu -> 200 menu
Add to cart POST /cart/items {"itemId":5521,"qty":2} -> 201
Place order POST /orders {"addressId":3,"pay":"UPI"} -> 201 {"orderId":"ORD-7781"}
Track order GET /orders/ORD-7781 -> 200 {"status":"PREPARING"}Example
The same pattern in ShopEase:
curl -i "http://localhost:3000/products?category=audio&page=1&limit=2"Example output
HTTP/1.1 200 OK
Content-Type: application/json; charset=utf-8
{"data":[{"id":7,"name":"boAt Airdopes 141","price":1299},{"id":8,"name":"JBL Go 3","price":2999}],"page":1,"limit":2,"total":14}