Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

Here's a step-by-step guide on how to perform an HTTP GET request using Telnet:

Open a terminal or command prompt on your computer. Type telnet example.com 80 and press Enter. Replace example.com with the domain you want to connect to and 80 with the port number (80 is the default port for HTTP). If the connection is successful, you'll see a blank screen or a prompt like "Connected to example.com." Now you need to type the HTTP GET request manually. Here's a basic request:

GET /path/to/resource HTTP/1.1
Host: example.com
Connection: close

Replace /path/to/resource with the actual path of the resource you want to request, and example.com with the domain you're connecting to.

Note that each line ends with a carriage return and a line feed (CRLF, represented as \r\n). In most terminals, you can simply press Enter to send a CRLF.

After typing the request, press Enter twice to send a blank line, signaling the end of the request headers. The server should now send the HTTP response, which will be displayed in your terminal. The response will include the status line, headers, and the requested resource's content (if available). Once the response is complete, the connection will close, and you'll be returned to the command prompt.