title: Sending Post request to RESTful WCF with json
body: <p>I have tried every combination to send a request to send a POST request to RESTful WCF from jQuery. </p>
  
  <p>Can someone imitate and make it working. Code is here : <a href="http://pastebin.com/Ua97919C" rel="noreferrer">http://pastebin.com/Ua97919C</a></p>
  
  <p>I am working with WCF from past 2 years, but every time i send a POST request it makes me struggle a lot.</p>
  
  <p>I am struggling to make it work from past 4 days and gone through atleast 35-40 posts.</p>
  
  <p>Eventually, this request would be sent from iPhone to WCF.</p>
  
  <p>When i check it with Fiddler the error mostly is: *The server encountered an error processing the request. The exception message is 'The incoming message has an unexpected message format 'Raw'. The expected message formats for the operation are 'Xml', 'Json'. This can be because a WebContentTypeMapper has not been configured on the binding. See the documentation of WebContentTypeMapper for more details.'. See server logs for more details. The exception stack trace is:
           at </p>
  
  <pre><code>System.ServiceModel.Dispatcher.DemultiplexingDispatchMessageFormatter.DeserializeRequest(Message message, Object[] parameters)
     at System.ServiceModel.Dispatcher.UriTemplateDispatchFormatter.DeserializeRequest(Message message, Object[] parameters)
     at System.ServiceModel.Dispatcher.DispatchOperationRuntime.DeserializeInputs(MessageRpc&amp;amp; rpc)
     at System.ServiceModel.Dispatcher.DispatchOperationRuntime.InvokeBegin(MessageRpc&amp;amp; rpc)
     at System.ServiceModel.Dispatcher.ImmutableDispatchRuntime.ProcessMessage5(MessageRpc&amp;amp; rpc)
     at System.ServiceModel.Dispatcher.ImmutableDispatchRuntime.ProcessMessage31(MessageRpc&amp;amp; rpc)
     at System.ServiceModel.Dispatcher.MessageRpc.Process(Boolean isOperationContextSet)
  </code></pre>