It seems my question is stupid .... !
I'll answer myself :

HttpClient client [...]

PostMethod method = new PostMethod("uri");
method.addParameter("param1", "value1");
[...]
client.executeMethod(method)
[...]

Sorry about this question ... I was mislead by the streamQuery() method
which is not implemented (I thought it was that method that was used to send
post data) ...

In France we have a saying that goes "one should turn one's tongue seven
times in one's mouth before speaking". I failed to do that ....

Thanks
-Vincent

----- Original Message -----
From: "Vincent Massol" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Thursday, August 23, 2001 6:19 PM
Subject: [HttpClient] How to send POST data ?


> This is probably a stupid question but I could not find any doc or any
test
> for this feature. How do you send POST data with HttpClient ?
>
> i.e. how do you do the equivalent of :
>
> HttpURLConnection connection [....]
>
> PrintWriter out = new PrintWriter(connection.getOutputStream());
> out.println("param1=value1");
>
> [...]
> connection.connect();
>
> Thanks
> -Vincent
>
>

Reply via email to