title: Override content headers for MVC POST request
body: <p>I am fairly new to MVC so I am hoping there is a solution to my problem. I am using third party hardware to communicate with my MVC web API. The hardware sends requests in a JSON format which I can extract perfectly fine. However, I am in the process of changing the parameter of these requests into binding model objects due to conflicts.</p>
  
  <p>E.G.</p>
  
  <pre><code>        Public Function POSTRequest(Action As String, Stamp As String) As HttpResponseMessage
             ...
          End Function
  
          Public Function POSTRequest(Action As String, OpStamp As String) As HttpResponseMessage
             ...
          End Function
  </code></pre>
  
  <p>So these two methods share the same calling card so they both cannot exist in the same controller.</p>
  
  <p>Due to this, I have created model binding objects to house these parameters instead. The problem is, once I do this, the web API complains about the request saying the "Content-Type" is not defined. Looking at it, the third-party hardware does not send a content-type up with the request. Looking on the net, I have found that this results in the browser treating it as the content type "application/octet-stream". This cannot then translate this into the binding object defined as the parameter.</p>
  
  <p>We have NO control over the third party hardware so we cannot define the content type for these requests. So, my question is, is there a way to intercept these requests and add a content type to them? Or even another way around this?</p>