HTTP Codes
Daily Standup
April 28, 2019
Finished up setting up all the controllers today, they are now individual testable units with testable helper functions inside.
Part of making them testable included adding status codes to the results, so I got acquainted with those.
HTTP Status Codes
These are the standard codes that are included with a server response to let the client know something about the data it’s getting. The common ones I already wrote about include:
- 200 - OK
- 404 - not found
- 500 - internal sever error
But I learned about some additional codes that come in handle when building RESTful routing on this handy list, such as:
- 201 - Created
- 204 - No Content
- 400 - Bad Request
The first two are the standard stati for CREATE
and DESTROY
CRUD operations respectively. 400
is a good catch-all for catching Promise errors.
Other Stuff
Long training run today…100 minutes!
Up Next
Still didn’t get to writing any test yet though 😂 So that’s next up!