Hi,

I need to encode my parameters in a GET request to a given host in iso-8859-1. How would I go about that with httpclient (3.1)?

There's EncodingUtil.getBytes that gives me a byte[]:

String messageData = "blah";

byte[] bytes = EncodingUtil.getBytes(messageData, "iso-8859-1");

How do I feed that byte[] properly to create a NameValuePair that I can feed to setQueryString, like so:

get.setQueryString(new NameValuePair[]{new NameValuePair("data", ???),

Any pointers how to solve this (may not even be specific to httpclient, just never stumbled upon this in java)?

Thanks,

bas.


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to