hc-httpclient-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Roland Weber <ROLWE...@de.ibm.com>
Subject Re: Invalid stream header
Date Fri, 30 Jun 2006 07:29:28 GMT
Hello Santo,

> Seems this is only possible since v3.0 of HttpClient, while I'm still 
using 2.0.


> PostMethod and PutMethod are available in v2.0 but I cannot find any 
> way than setRequestBody
> to post data to the server, meaning I have to use a NameValuePair array,

you can set the request body as an InputStream at least:

> meaning I cannot send my Hashtable (and other objects)
> without first converting it into a ByteArray,

true, but you'll have to convert to a binary representation anyway.

> which is what I'm doing right
> now and is giving the "invalid stream header".

You're getting a problem on re-conversion, and you're not sending
a byte array but some string stuff. That isn't necessary with 2.0 either.
> Probably the best thing I can do is upgrade to 3.0, but before I do that 
> want to know if it's backwards compatible with 2.0

probably best: yes. backwards compatible: not fully.

> or will it be very likely I have to modify large parts of my code ?

It is very likely you'll have to modify minor parts of your code.


To unsubscribe, e-mail: httpclient-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: httpclient-user-help@jakarta.apache.org

View raw message