hc-httpclient-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sANTo <santo.pr...@gmail.com>
Subject Re: garbage in responsebody
Date Mon, 26 Jun 2006 14:00:37 GMT
On 6/26/06, Roland Weber <http-async@dubioso.net> wrote:
>
> sANTo wrote:
>
> > Any ideas where the garbage in responsebody comes from ?
>
> It comes from your *serializing* a string instead of writing
> it as text. I suggest you deserialize the data on the client
> to get back a string object.



You're right, thanks
Apparently I followed the HttpClient example too strict in that I used the
getResponseBody() method instead of the getResponseBodyAsStream() method
losing the deserialization (which was there in my code before the switch to
HttpClient).

On another note, what do you exactly mean by this:

By the way,
> setting the Content-Type to text/xml while you're actually
> sending binary serialized objects is tight.
>
>
Would you suggest to use  "application/octet-stream" instead ?
Fact is that I know for sure that the data will be xml at all times in this
situation

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message