Web Request Set Content-Type

  • 23 April 2015
  • 2 replies
  • 3 views

Badge +7

I get the following error when I make a web request.  I've added a header "Content-Type" and set it to "application/xml".

This header must be modified using the appropriate property.

Parameter name: name

I get some BING results that specify that the Content-Type header is protected and must be set using the ContentType property.  Wondering if anyone else has run in to this.  The service I'm calling is not my own so I can't dictate what it returns (JSON) by default and it looks like it will be easier to work with Xml in my Nintex WF.


2 replies

Userlevel 7
Badge +11

Is this a custom built web service?  Do you have anything that will call the web service successfully now?  If you do, you can use Fiddler to capture the data that gets sent so that you can reproduce it,.

cheers,

Vadim

Userlevel 5
Badge +9

Actually with the web request action you cannot add a header which name is "Content-Type".

If it is a POST request, you can specify "application/xml" in the "Content type" field (just Under the radio buttton where you can select the type of request - GET, POST ...). If it is a GET request, I can try to execute it without specifying the content type : I've already done it and it worked.

Hope this helps

Reply