Introduction
We check the status code to make sure the server responded correctly. It tells us if our request worked or if there was a problem.
When testing if a webpage loads successfully.
When checking if a login API returns success or failure.
When verifying that a resource was created or deleted.
When making sure an error is handled properly by the server.