Node JS & Express Framework with
Complete Solutions
An HTTP user agent is - ANSWER-any software that a user makes use of to make
requests to a web server. In most cases, the user agent happens to be a web browser.
Content-Type header - ANSWER-Whenever an HTTP server sends a response, it also
specifies what kind of data it is sending via the Content-Type header,
The Content-Type header can have an optional parameter, which specifies the
encoding for the data being transferred. On the Web, this parameter is most commonly
applicable to string data, such as plain text, HTML, and JSON
UTF-8 is the most popular encoding format on the Web, and is the default in JavaScript,
Node, and Express.
errorHandler - ANSWER-Middleware for handling errors. Should be added AFTER the
router middleware
Express middlewares available by default - ANSWER-router - the apps routing system
logger - Log requests to the server
compress - gzip/defalte support on the server
basicAuth - basic HTTP authentication
json - Parse application/json
urlencoded - parse application/x-www-form-urlfencoded
multipart - parse multipart/form-data
HTTP headers - ANSWER-are protocol-level information sent by an HTTP server in
response to a request. They are not displayed by the browser, but can be seen using a
traffic analyzer or web development tools such as Firebug and Chrome Developer Tool.
HTTP response headers - ANSWER-are key-value pairs sent after the HTTP status
code in a HTTP message. These headers are used for conveying various important
pieces of information from the server to the user agent.
HTTP response message. - ANSWER-The data sent by an HTTP server in response to
a request.
It is composed of a status code, headers, and optional associated data, which is
technically referred to as the body of the message.
All responses from an HTTP server come with an associated status code. The most
common among them is 200—the code for a successful request
Complete Solutions
An HTTP user agent is - ANSWER-any software that a user makes use of to make
requests to a web server. In most cases, the user agent happens to be a web browser.
Content-Type header - ANSWER-Whenever an HTTP server sends a response, it also
specifies what kind of data it is sending via the Content-Type header,
The Content-Type header can have an optional parameter, which specifies the
encoding for the data being transferred. On the Web, this parameter is most commonly
applicable to string data, such as plain text, HTML, and JSON
UTF-8 is the most popular encoding format on the Web, and is the default in JavaScript,
Node, and Express.
errorHandler - ANSWER-Middleware for handling errors. Should be added AFTER the
router middleware
Express middlewares available by default - ANSWER-router - the apps routing system
logger - Log requests to the server
compress - gzip/defalte support on the server
basicAuth - basic HTTP authentication
json - Parse application/json
urlencoded - parse application/x-www-form-urlfencoded
multipart - parse multipart/form-data
HTTP headers - ANSWER-are protocol-level information sent by an HTTP server in
response to a request. They are not displayed by the browser, but can be seen using a
traffic analyzer or web development tools such as Firebug and Chrome Developer Tool.
HTTP response headers - ANSWER-are key-value pairs sent after the HTTP status
code in a HTTP message. These headers are used for conveying various important
pieces of information from the server to the user agent.
HTTP response message. - ANSWER-The data sent by an HTTP server in response to
a request.
It is composed of a status code, headers, and optional associated data, which is
technically referred to as the body of the message.
All responses from an HTTP server come with an associated status code. The most
common among them is 200—the code for a successful request