I am curios about how one can set the request properties for a PostMethod in Apache Commons HttpClient?
I am refactoring some code written using HttpURLConnection class to post which looks like the following:
conn1.setRequestProperty(
"Content-Type", "multipart/related; type=\"application/xml\"; boundary="
+ boundary);
conn1.setRequestProperty("Authorization", auth);
... ...
To use:
PostMethod method = new PostMethod(_Server);
method.setRequestBody(...); or
method.setRequestHeader(...);
But i am not sure if / how this will map to what i want to do with the original URL class... can anyone help clarify how to set request properties with PostMethod class?
Thanks a lot!
-alex