http-headers

Getting started with http-headers

Remarks#

HTTP Headers are an important part of HTTP communication. Each HTTP request and HTTP response usually contain multiple headers. Intermediaries such as proxies often interpret some of the headers and pass on or filter out others.

HTTP Request

A simple HTTP Request for the resource /index.html. The host www.example.com is specified in the HTTP Host header.

GET /index.html HTTP/1.1
Host: www.example.com

HTTP Response

A possible response to the request above. The response contains the HTTP headers Date, Content-Type, Content-Encoding and Content-Length.

HTTP/1.1 200 OK
Date: Wed, 21 Jun 2017 10:58:03 GMT
Content-Type: text/html; charset=UTF-8
Content-Encoding: UTF-8
Content-Length: 150

<response body>

The response body is sent after the headers, separated by a blank line.


This modified text is an extract of the original Stack Overflow Documentation created by the contributors and released under CC BY-SA 3.0 This website is not affiliated with Stack Overflow