Tom said:
You can connect to anything using sockets. In the end that's how it's
going to get done anyway... The trick is reading the correct RFC so you
know the proper syntax for what you pump down the stream and read from
the stream.
The RFC for HTTP 1.1 happens to be 2616 and you can find a copy here;
http://www.faqs.org/rfcs/rfc2616.html
<snip>
I'm familiar with HTTP/1.0 and 1.1. I'm just not sure how to *send*
data with java.net.Socket. Looking at its documentation, I see three
functions that have send in their name - getSentBufferSize (which
doesn't send anything), sendUrgentData (which sends one byte), and
setSendBufferSize (again, doesn't send anything). So how do I send
"GET / HTTP/1.0\r\nHost:
www.google.com"? Do I send it one byte at a
time or can I send the whole string?