On Wed, 2012-07-18 at 16:44 +0200, Michele Mancioppi wrote:
> Hi all,
> 
> 
> I was wondering what is the best way to marshall an HttpMessage (more
> specifically, instances of HttpGet, HttpPost and HttpRequest) to a string.
> 
> 
> I am using httpcore 4.0.1 and httpclient 4.1.
> 
> 
> Thanks in advance,
> 
> Michele

Michele

I guess this pretty much depends on your specific use case and whether
you want to serialize message head (request line + headers) only or the
whole thing including a content body.

Take a look at the source of DefaultClientConnection and related
classes. This class can optionally write out the entire message to a
logging backend. You might want to re-use bits of it for your message
serializer.

Hope this helps

Oleg


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to