File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
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
JavaRanch » Java Forums » Products » Other Open Source Projects
Bookmark "[httpclient] output http-request as String" Watch "[httpclient] output http-request as String" New topic

[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. - 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!

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