This week's book giveaway is in the Jobs Discussion forum.
We're giving away four copies of Customer Requirements for Developers and have Marcho Behler on-line!
See this thread for details.
The moose likes Other Open Source Projects and the fly likes [httpclient] output http-request as String Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Customer Requirements for Developers this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Products » Other Open Source Projects
Bookmark "[httpclient] output http-request as String" Watch "[httpclient] output http-request as String" New topic
Author

[httpclient] output http-request as String

Lukas Benberg
Ranch Hand

Joined: Jan 03, 2007
Posts: 45
hi all,
how can i output a as a string (for debugging)?




thank you L
[ July 18, 2007: Message edited by: Ben Souther ]
Freddy Wong
Ranch Hand

Joined: Sep 11, 2006
Posts: 959

I don't think you can output it like that because the request parameters are actually inside the HTTP body (it's POST and not GET). If you really want to output it like that, the easiest way is to do this (it's a hack, though).



SCJP 5.0, SCWCD 1.4, SCBCD 1.3, SCDJWS 1.4
My Blog
steve souza
Ranch Hand

Joined: Jun 26, 2002
Posts: 862
You could also inherit from HttpClient and add the behaviour you want.


http://www.jamonapi.com/ - a fast, free open source performance tuning api.
JavaRanch Performance FAQ
Lukas Benberg
Ranch Hand

Joined: Jan 03, 2007
Posts: 45
thanks freddy and steve,
the hack is perfectly ok for my needs!

L
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: [httpclient] output http-request as String
 
It's not a secret anymore!