Skip to content

Instantly share code, notes, and snippets.

@paul-jean
Created June 15, 2014 01:32
Show Gist options
  • Select an option

  • Save paul-jean/6fdb08cfdfeebf458fd6 to your computer and use it in GitHub Desktop.

Select an option

Save paul-jean/6fdb08cfdfeebf458fd6 to your computer and use it in GitHub Desktop.
simplest possible HTTP GET request
echo -e "GET / HTTP/1.0\r\n\r\n" | nc google.com 80 | head -5
@paul-jean
Copy link
Copy Markdown
Author

Output:

[rule146@rule146: Desktop]$ echo -e "GET / HTTP/1.0\r\n\r\n" | nc google.com 80 | head -5
HTTP/1.0 200 OK
Date: Sun, 15 Jun 2014 01:30:35 GMT
Expires: -1
Cache-Control: private, max-age=0
Content-Type: text/html; charset=ISO-8859-1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment