commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From qiang zhou <>
Subject Re: [HttpClient] How to output the http request body?
Date Wed, 21 Dec 2005 13:46:15 GMT
But request onle have getInputStream() method. If you want output request body, then
InputStream in = request.getInputStream();
byte[] bytes = new byte[1024];
while(!=-1) {
   //output content.

----- Original Message ----
From: Xiaobo Yang <>
Sent: 2005年12月20日 7:47:28
Subject: [HttpClient] How to output the http request body?


I managed to output the http request head by adding a println statement in (write method). When I tried to output the http request
body, I found it to be a OutputStream object. Could anybody tell me how to
print out the http request body? Also I wonder how to output the http
response for debugging purpose. Thanks in advanced.

Xiaobo Yang

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message