Posted: Thu Oct 23, 2008 10:29 pm Post subject: Get Request Example
I'm trying to find an example of a get request, but I'm having a hard time. I googled it but the solutions vary, so I'm not sure. From what I've seen it should look something like:
Code:
GET /wiki/Main_Page HTTP/1.x
I put the 1.x because I tend to see different numbers after the one, and I can't figure out if it makes a significant difference if let's say I put 1.0 instead of 1.1. Also, on some examples I see under the GET /wiki/Main_Page HTTP/1.x this:
Code:
Host: en.wikipedia.org
Is that a mandatory part of the request, and is it even part of the request? _________________
GET /path/to/whatever?can=have&this=stuff HTTP/1.0
[optional: HTTP headers like so - note Referer must be spelled wrong to work (it was spelled wrong in the standard]
Referer: iamafaggot.cx
note it takes multiple newlines to signal the end of the headers.
Alernatively, you can use HTTP/1.1:
Code:
GET /path/to/whatever?can=have&this=stuff HTTP/1.1
[note: host is REQUIRED with HTTP/1.1 or you will get Bad Request. all other headers are optional]
Host: www.moocow.com
Referer: iamafaggot.cx
Edit: didn't totally read the second part of your comment at first. Host: is required for 1.1 and not for 1.0. However, many websites will be confuzzled without a host, any shared host will not know what page to send you to (since you can have more than one domain name representing different sites on one IP). _________________
Mutilated lips give a kiss on the wrist of the worm-like tips of tentacles expanding in my mind
I'm fine accepting only fresh brine you can get another drop of this yeah you wish
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum You cannot attach files in this forum You can download files in this forum