Hi,

Have searched the archives, but cannot find an answer on how to submit a POST that has 
form parameters that need to be encoded in UTF-8.  I am setting the Content-Type 
request header, but am unsure as how to set the request body.  Do I use a 
ByteArrayInputStream?  Does anyone have an example of how to do this as far as putting 
FORM parameters into the IS?  Do I do something like:

byte [] bytes = "myKey=myValue".getBytes("UTF-8");

ByteArrayInputStream is = new ByteArrayInputStream(bytes);
postMethod.setRequestBody(is);


---
I have 4 such parameters that need to be sent.  Any help is appreciated.

Thanks,
Grant


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

Reply via email to