Tutorial by Examples

This example demonstrates that HTTP is a text-based Internet communications protocol, and shows a basic HTTP request and the corresponding HTTP response. You can use Telnet to manually send a minimal HTTP request from the command line, as follows. Start a Telnet session to the web server www.e...
In HTTP 1.1, a minimal HTTP request consists of a request line and a Host header: GET /search HTTP/1.1 \r\n Host: google.com \r\n \r\n The first line has this format: Method Request-URI HTTP-Version CRLF Method should be a valid HTTP method; one of [1][2]: OPTIONS GET HEAD POST PUT ...
Header fields (usually just called ‘headers’) may be added to an HTTP request to provide additional information with the request. A header has semantics similar to parameters passed to a method in any programming language that supports such things. A request with Host, User-Agent and Referer header...
Some HTTP requests may contain a message body. This is additional data that the server will use to process the request. Message bodies are most often used in POST or PATCH and PUT requests, to provide new data that the server should apply to a resource. Requests that include a message body should a...

Page 1 of 1