Set the Content-Encoding in the headers of an HTTP Post

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Has anyone been able or is having trouble with setting the Content-Encoding
to a value in the headers collection of an HTTPWebRequest object.

I am trying to post a RosettaNet message to a trading partner that is using
webMethods server. The message gets to their server just fine but it is not
processing. They are telling me that the $contentEncoding has a value of
NULL. They are telling me that this is part of the Header information. I
have looked up the header property info on MSDN but I don't see anything
mentioned of setting the ContentEncoding.

Any one have suggestions.

Thanks,

Paul
 
Thanks,
Could you tell me what or where I can find valid values for the
"Content-Encoding"? If I add it to the headers collection what are valid
values for it?

Would this be a valid value:

myWebHeaderCollection.Add("Content-Encoding", "UTF8")

Thanks,

paul
 
Thus wrote Paul,
Thanks,
Could you tell me what or where I can find valid values for the
"Content-Encoding"? If I add it to the headers collection what are
valid
values for it?

See http://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.5. Probably
RosettaNet defines its own additional headers, but I suspect what you're
really looking for is a way to set the character encoding of your message.
Would this be a valid value:

myWebHeaderCollection.Add("Content-Encoding", "UTF8")

Usually not, because a character encoding isn't a content encoding as defined
in http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.11. The character
encoding can be set using the Content-Type header, e.g.
Content-Type: text/xml; charset=UTF-8

Cheers,
 
Back
Top