You can put a name for the session, e.g., "HTTP Testing", in the "Saved Sessions" field, if you want to save the configuration for continued testing.
Click on Connection under Category and set the keepalive option to a few seconds, e.g., 5, to lessen the chance of the connection being dropped.
Under Session click on Logging then select "Printable Output" for Session logging and specify a location and file name for the log file under "Log file name".
Click on Sesion again under Category and, if you've given the session a name, click on the Save button to save the configuration for the session so you can open a session with the same configuration in the future without having to reset all of the options.
To connect to the web server, click on the Open button; if
you've saved the session and don't have it loaded, select it and click on
the Load buton first.. When the window opens for the connection,
you can type GET / HTTP/1.1
and hit Enter and
then type Host: example.com
, or whatever the name is for
the website, e.g., www.microsoft.com, etc.
Then hit enter a couple of times. If you use example.com for testing, that is a site specifically created for illustrative purposes, so you will see the following:
You can also see what your entered and the site's response in the PuTTY log file.
If the log file already exists when you connect to the site, you will see a warning window open telling your the session log file already exists. You will be asked if you wish to overwrite it, append to the end of it, or disable logging for the session.
When you enter GET / HTTP/1.1
you are telling the web server
that you want to fetch the root page from the website with GET /
.
To fetch a specific webpage you could use something like
GET /trees/oak.html
. "Get" is the
request method you are specifying and what follows is the relative location
for the page that you wish to view. Then you put a space and specify the
version of the HTTP protocol you wish to use, i.e. "HTTP/1.1".
The host
line that you enter is an
HTTP header
field. You follow host
with a colon and a space then the
name of the website, e.g. example.com
. A web server might handle
multiple websites, which is why the host header is needed. In the prior version
of the protocol HTTP 1.0, that header wasn't necessary, but it is mandatory
with HTTP/1.1.
Created: Sunday July 5, 2015