Chapter 4. Response From the Server
This chapter is about understanding how web servers respond to HTTP requests and how it works in Express. We will cover the details of the response process and learn how to serve different kinds of content in Express.
You will learn the following in this chapter:
- The basics of HTTP response format
- How to set HTTP status code in Express
- How to set HTTP headers in Express
- How to serve different kinds of content in Express
A primer on HTTP response
To understand the types of response Express is capable of generating and have a better control over them, it is important that you have some technical understanding about the underlying HTTP protocol's response format. So, let's go over it real quick and cover the basics.
Get Express Web Application Development now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.