ExpressJS Route with Custom Response Status Code

22 days ago
4

Learn how to define an endpoint for an Express server that responds with a status code other than the default of 200 OK.

In particular the lecture demonstrates how to set the status code to 404 Not Found before the response is sent back to the requesting client.

A student question about why not setting headers in the call to the send function is also addressed.

Loading comments...