How to use telnet to test your web server

Cli

Usage

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
# telnet ${YOUR_SERVER} ${PORT_NUMBER}
telnet localhost 80
telnet_mode>_

# example 1: telnet www.google.com 80
GET / HTTP/1.1
Host: www.google.ccom
[ENTER]
[...HTTP_RESPONSE]

# example 2: telnet localhost 8080
GET /controller/action?a=b HTTP/2
Host: localhost
User-Agent: Mozilla/5.0 AppleWebKit/500.0 Chrome/60.0
[ENTER]
[...HTTP_RESPONSE]