Content type header on http post.

Home Page Forums BizTalk 2004 – BizTalk 2010 Content type header on http post.

Viewing 1 reply thread
  • Author
    Posts
    • #16421

      I am attempting an http post to a service where, the API does not accept a charset attribute on the Content-Type HTTP header (e.g. Content-Type: text/xml; charset=UTF-8).

      The call will work if the charset attribute is not included. 

      I can find no way to cause Biztalk to not add the Charset attribute.  Could you please advise me as to how to configure this to not be set, or to eliminate it from the post?

      Cheers!

    • #16435

      I've been looking a bit at this, and it seems the HTTP adapter basically does this:

      1- It checks the ContentType property of the message to send (or the one configured in the send port options).

      2- IF the content type is a text content type (i.e. "text/<whatever>"), it will look at the message body part's Charset property and add the ";charset = " part to the content type of the HTTP request. If the type is not a text type, it leaves it alone.

      Looking at the code, one thing I see that might get you out of the issue would be to explicitly ensure the message body part has a null or empty value value for the Charset property by the time it reaches the adapter. Since you might want to have an assembler in the send pipeline, your best bet would be to create a custom pipeline component and add it to the Encode stage of the send pipeline and change the value there after the assembler has already processed the message.

      HTH, 

Viewing 1 reply thread
  • The forum ‘BizTalk 2004 – BizTalk 2010’ is closed to new topics and replies.