Instructor: Okay, so that conclude our discussion
about status codes.
So let's summarize what we have talked about.
First, always return the appropriate status code.
Always be aware that the default one is the 200
and you should not return it in any case.
Also remember that not all clients are familiar
with all codes, so therefore you should stick
to the most popular one and the ones that you can assume
the client will be familiar with.
For example, the 200, 201, 204, 400, 404
and 500 are usually well known
and you can assume the client knows the status code
and is ready for them.
Now, make sure to take a look
at the resource section of this lecture.
There is a document there summarizing all the status code
we discussed with the role and also a table showing
what status codes are relevant for each verb.
I use this table when designing the architecture
of systems I'm working on
and I'm sure you will find it useful too.