tags:

views:

46

answers:

3

I want to make a basic HTTP request using these tokens: http://www.w3.org/Protocols/rfc2616/rfc2616-sec5.html

I know Java does it for you normally, but I want to specifically set certain tokens.

A: 

You may want to look at this question/answer session

Luciano Fiandesio
+1  A: 

Open a socket to port 80 on the host you want to connect to, and then just write to the stream in the same way you'd write to a file or the console.

bluesmoon
+4  A: 

Why reinvent the wheel ? The Apache Http Client 4 conforms to rfc2616.

bunting
Definitely use this, and it does allow you to "set certain tokens"If not, this is an OOP language. Override a method.
Tom Dignan