Http Post not posting data
I'm trying to post some data from a Java client using sockets. It talks to localhost running php code, that simply spits out the post params sent to it. Here is Java Client: public static void main(String[] args) throws Exception { Socket socket = new Socket("localhost", 8888); String reqStr = "testString"; String urlParameters = URLEncoder.encode("myparam="+reqStr, "UTF-8"); System.out.println("Params: " + urlParameters); try { Writer out = new OutputStreamWriter(socket.getOutputStream(), "UTF-8"); out.write("POST /post3.php HTTP/1.1\r\n"); out.write("Host: localhost:8888\r\n"); out.write(