Official solution
SimpleHTTP verbs REST ke tools. Methods HTTP ke hain, REST unhe convention se use karta hai.
GET read cacheable. POST create payload. PUT replace. PATCH patch. DELETE remove.
GET exists bina REST ke bhi — browser address bar.
HTTP verbs + status REST ki zabaan. GET read, POST create, PUT replace, PATCH partial, DELETE remove. GET typically no body.
Status: 200 OK, 201 created, 202 accepted (Celery task), 400 bad input, 401 no/bad token, 403 role nahi, 404 missing, 409 conflict (double book), 500 server.
AJAX/fetch page reload nahi. SPA poori isi pe. Postman se bina Vue ke API prove karo — examiner pasand.
Example
GET /api/venues
POST /api/venues
PUT /api/venues/1
DELETE /api/venues/1
Project example: resources.py methods list. Postman 4-5 calls.
Viva tipGET typically no body (cacheable). POST/PUT/PATCH haan payload. PUT idempotent, POST nahi.