Basic HTTP Request Example

This is a simple example of a basic HTTP GET request. You can use this format to retrieve data from a web server.

  • Request Line: This is the first line of the HTTP request and includes the method (GET), the resource path (en/learn/examples/basic-request), and the HTTP version (HTTP/1.1).
  • Headers: These are key-value pairs that provide additional information about the request. For example, the Host header specifies the domain name of the server.
  • Body: The body of the request is empty for a GET request.

Here is a sample GET request:

GET /en/learn/examples/basic-request HTTP/1.1
Host: www.example.com

HTTP Request

For more information on HTTP requests, you can read about HTTP Methods on our website.