Hi all
I'm using HttpClient to create a post request. I send this req to a website but the reply isn't as expected.
My request needs to be formatted like this simple request:
This is the req generated by Internet Explorer and I need to replicate it programmatically with HttpClient.
I'm using something like
but the response from the server is not ok. The page returned from the server is an error page, it seems that maybe something is missing in the Post headers.
Printing the requestEntity request gives me the post request body and this is ok!
So maybe it's only a header problem.
I know that the 2 important headers are Content-Type and Content-Length, I have check them and they are ok.
The Content-Length is correctly set directly by the httpPostMethod.setRequestBody(parameters); and it returns the correct int body size value.
So I'm trying to set something like
but the reply is always the error page.
Someone knows how to configure a correct Post request with HttpClient based on these param?
Thanks

[ July 05, 2008: Message edited by: al nik ]