Hi I've got a suggestion (or a question) about the setRequestBody on the Method objects. (using HTTP Client 2.0 beta)
There are three versions: one that takes a String, one that takes an InputStream, and one that takes a NameValuePair[].
Why isn't there a setRequestBody that takes a byte[] ?
I need this because I have this XML document encoded using UTF-8 in a byte[], and I want to add this as the request body in a PostMethod.
Currently I've solved this by using the InputStream version:
method.setRequestHeader("Content-type", "text/xml; charset=UTF-8");
method.setRequestBody(new java.io.ByteArrayInputStream(xmlDocument));I can't use the String version of setRequestBody because I don't know how that one encodes the String in the message (that isn't documented?).
Thanks in advance for any comments/suggestions on this.
--Irmen de Jong
PS I'm not on the mailing list, so please reply privately too...
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
