The learner can match HTTP methods to actions and read status codes (2xx/3xx/4xx/5xx), including 200, 301, 401/403, 404, 500.
Breaking down methods and status codes
Breaking down methods and status codes
HTTP methods tell the server what action the client wants to perform. GET reads data without changing anything — for example, loading a list of products. POST creates something new — for example, submitting a sign-up form. PUT updates or replaces an existing resource — for example, editing a user profile. DELETE removes a resource. Choosing the wrong method for an action is itself a defect worth reporting.
Status codes are grouped into classes by their first digit. 2xx means success: 200 OK is the standard "it worked" code, and 201 Created confirms that a new resource was created (usually after a POST). 3xx means redirection: 301 Moved Permanently tells the client the resource has a new permanent URL, while 302 Found is a temporary redirect. 4xx means a client-side error: 400 Bad Request means the request was malformed, 401 Unauthorized means authentication is required, 403 Forbidden means the server understood the request but refuses to fulfil it (the distinction matters: 401 = not logged in, 403 = logged in but not allowed), and 404 Not Found means the resource does not exist. 5xx means a server-side failure: 500 Internal Server Error means something went wrong on the server.
An important tester's mindset: a 200 code does NOT guarantee the response is correct. If you requested a user profile and the server replied 200 OK but returned an empty body or someone else's data, that is still a defect. Always check BOTH the status code AND the contents of the response body. A green light from the server is not the same as a correct answer.
Lesson notes
Breaking down methods and status codes
HTTP methods tell the server what action the client wants to perform. GET reads data without changing anything — for example, loading a list of products. POST creates something new — for example, submitting a sign-up form. PUT updates or replaces an existing resource — for example, editing a user profile. DELETE removes a resource. Choosing the wrong method for an action is itself a defect worth reporting.
Status codes are grouped into classes by their first digit. 2xx means success: 200 OK is the standard "it worked" code, and 201 Created confirms that a new resource was created (usually after a POST). 3xx means redirection: 301 Moved Permanently tells the client the resource has a new permanent URL, while 302 Found is a temporary redirect. 4xx means a client-side error: 400 Bad Request means the request was malformed, 401 Unauthorized means authentication is required, 403 Forbidden means the server understood the request but refuses to fulfil it (the distinction matters: 401 = not logged in, 403 = logged in but not allowed), and 404 Not Found means the resource does not exist. 5xx means a server-side failure: 500 Internal Server Error means something went wrong on the server.
An important tester's mindset: a 200 code does NOT guarantee the response is correct. If you requested a user profile and the server replied 200 OK but returned an empty body or someone else's data, that is still a defect. Always check BOTH the status code AND the contents of the response body. A green light from the server is not the same as a correct answer.