hc-httpclient-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Roland Weber <http-as...@dubioso.net>
Subject Re: passing object
Date Thu, 08 Jun 2006 17:44:21 GMT
Hello Michael,
> Is that a correct way to do that like this:
> In client side, serializing object to string and send it as URL post
> parameter.
> In the server side, de-serializing the string to object.

Almost correct. But you serialize to a byte array, not a string.
And you don't send it as a parameter, unless you want to pass
other parameters as well. If the serialized object(s) is all you
want to send, you send the byte array as the request entity.

If you want to have an advanced design, you can implement the
request entity interface directly and serialize the object to
the output stream in writeRequest(...):

If you want to pass additional parameters with your serialized
object, your options are:
a) send them as query parameters in the URL
b) use a multipart request entity and serialize to a PartSource
   instead of a ByteArrayRequestEntity


hope that helps,

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

View raw message