I am Working in client server application .I am opening the Http connection with POST Method .When I am sending only some headers with URL then its working fine.
But When I am sending some Data(image file converted to ByteArray) using,
out = connection.openOutputStream();
out.write(string.getBytes()); //string is the image file converted to String
I am getting the "400 Bad request",I don't know why the Bad request error appears? I want to know the exact reason of the problem. and the solution to this.
So will any one give solution to this problem?