HTTP methods in a REST API
HTTP methods in a REST API: GET reads a resource, POST creates one, PUT updates one and DELETE removes one. The server replies with a status code such as 200 OK or 404 Not Found.
Understanding HTTP methods in a REST API in QCE Digital Solutions Unit 4
What it does: POST sends new data to create a resource, and 201 Created is the status code that confirms the new resource was made. GET reads a resource. It should not change any data on the server. PUT updates a resource, for example changing a student's email. DELETE is the method that removes it. 200 OK means success. 404 Not Found is the code for a missing resource. 404 Not Found tells the client that the requested resource does not exist.
Common mistakes: The program wants to read the list of pets, so it needs GET. DELETE removes a resource. The line should be r = requests.get(url). 404 means Not Found. A successful POST that creates a resource returns 201 Created, so the check should be r.status_code == 201.
Free printable worksheet with full answer key — or add this module to a class and your students practise it interactively.
This module's key terms are also in a printable crossword (Modules 89–125) and word search (Modules 17–125).
Take this worksheet further — free with Cloodit
Each concept is reinforced from every angle — learned, then applied, then tested.
Cloodit turns curriculum-aligned coding content into journeys students work through one biome at a time.
Over 100 of them, across seven natural biomes.
Turns their work into revision material ready for Flash Cards and Exam study.
Live, competitive practice for the start of the lesson or a teacher-led lesson finisher.
Honour your top performers, or encourage a student who's trying hard — ready to print in seconds.
Quick Questions
Match the Pairs
Key Term
GET, POST, PUT, DELETEFill in the Blanks
Spot the Error
Student with a class code? Join your class →