Skip to Main Content

Java Programming

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Content type when using Http post (Apache HttpClient)

807589Dec 14 2008 — edited Dec 14 2008
Hi,

I'm using Apaches HttpClient with a PostMethod to post an xml document to a server. (the xmldocument is the only parameter - xml=<xmldocument>)
In return I get a html-snippet.
I need to set the ContentType and encoding in the header of the post.
I know how to do it (setRequestHeader() method), but not sure what value I should use for ContentType?

/best regards, HÃ¥kan Jacobsson - System developer in Sweden, Stockholm.
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jan 11 2009
Added on Dec 14 2008
3 comments
420 views