Lesson 36 webpages
To connect to a remote webpage, we must do the following:
-
Create an active socket that we will use to send outbound requests
-
Connect our socket with a socket on the remote webpage
-
Send a http formatted request from our socket to their webserver
-
Recieve the http formatted response from webserver
An http formatted request is split into 3 sections:
-
Line containing requrest method, request url and http version
-
Optional section of request headers
-
Empty line. Tells remote server you have finished sending request