title: Alternative headers to "application/x-www-form-urlencoded"
body: <p>So I have a funny little problem.</p>
  
  <p>When calling my <code>API</code> from an <code>AngularJS</code> client with the following code, everything works fine, except that my <code>API</code> only recieves an empty object as data:</p>
  
  <pre><code>var req = {
        method: 'Post',
        url: config.API + request.toLowerCase() + '/',
        headers: { 'Content-Type': 'application/x-www-form-urlencoded' },
        data: data
  }
  
   $http(req)
       .then(function(response){
            // handling response
       })
  </code></pre>
  
  <p>Now, if I remove the <code>headers: { 'Content-Type': 'application/x-www-form-urlencoded' }</code> or changes it to <code>headers: { 'Content-Type': 'application/json' }</code> I get the this error:</p>
  
  <blockquote>
    <p>The requested resource does not support http method 'OPTIONS'</p>
  </blockquote>
  
  <p>My <code>API</code> controller looks like this:</p>
  
  <pre><code>    [EnableCors("*", "*", "*")]
      [HttpPost]
      public string Post([FromBody]dynamic value)
      {
          // Do some stuff
          Response response = new Response();
          return JsonConvert.SerializeObject(response);
      }
  </code></pre>
  
  <p>What I'm looking for is a way to prevent the tiresome "OPTIONS not supported" error, and still be able to send dynamic data to my controller</p>
  
  <p><strong>EDIT</strong><br>
  Regarding the duplicate, I've already tried their approach, hence why I already are using <code>[EnableCors]</code> in my controller. But if I add this:</p>
  
  <pre><code>public static void Register(HttpConfiguration config)
  {
      config.EnableCors();
  }
  </code></pre>
  
  <p>I get this error instead</p>
  
  <blockquote>
    <p>Response to preflight request doesn't pass access control check: The
    'Access-Control-Allow-Origin' header contains multiple values '*, *',
    but only one is allowed. Origin '<a href="http://localhost:82" rel="nofollow noreferrer">http://localhost:82</a>' is therefore not
    allowed access</p>
  </blockquote>