Web Technologies - Old Questions

6.  What are the different types of headers in an HTTP message from a client? Explain.

5 marks | Asked in 2068

HTTP header fields provide required information about the request or response, or about the object sent in the message body. There are four types of HTTP message headers:

  • General-header: These header fields have general applicability for both request and response messages.
  • Request-header: These header fields have applicability only for request messages.
  • Response-header: These header fields have applicability only for response messages.
  • Entity-header: These header fields define meta information about the entity-body or, if no body is present, about the resource identified by the request.

All the above mentioned headers follow the same generic format and each of the header field consists of a name followed by a colon (:) and the field value as follows:

    message-header = field-name ":" [ field-value ]