I was curious as to how we can call methods on the response object passed into our callback. How does this work? What even is the response object?
Steven Parker179,704 Points
The response object represents the outgoing data stream.
It contains many useful methods for sending data back to the client. Those methods are provided for you to use in creating your response to the request. Its properties and methods are described in detail in the node.js documentation.