Get some HTTP content without a browser

From XPUB & Lens-Based wiki

For that we need to connect to the machine serving the pages, and input by hand the requests. In that situation everything is done manually and we need to be very precise with the requests. For example:

  • With the following, we will get a bad request error:
nc pzwart.wdka.nl 80
GET /networked-media HTTP/1.1
Host: pzwart.wdka.nl

EOF
  • With the following, we will get a permanent redirection error:
nc pzwart.wdka.nl 80
GET /networked-media/index.php HTTP/1.1
Host: pzwart.wdka.nl

EOF
  • Finally the following GET is correct and will allow us to be served with right content:
nc pzwart.wdka.nl 80
GET /networked-media/ HTTP/1.1
Host: pzwart.wdka.nl

EOF