You can use this way to send an http request:
String host = "www.life.com";
Socket socket = new Socket(host, 80);
String request = "GET / HTTP/1.0\r\n\r\n";
OutputStream ostream= socket.getOutputStream();
ostream.write(request.getBytes());
ostream.flush();
InputStream is = socket.getInputStream();
int choice;
while( (choice=is.read())!= -1)
System.out.print((char)choice);
socket.close();