title: The request entity's media type 'text/plain' is not supported for this resource
body: <p>I am writing a service with POST request as:</p>
  <pre><code>    [HttpPost]
      [ActionName(&quot;Post&quot;)]
      public HttpResponseMessage Post([FromBody]string JStringCont)
      {
         ....
      }
  </code></pre>
  <p>Call to this service is given as:</p>
  <pre><code>    string jsonContent=&quot;[{some json}]&quot;
      StringContent content = new StringContent(jsonContent);
      _oHttpClient = new HttpClient();
      _oHttpClient.DefaultRequestHeaders.Accept.Clear();
  _oHttpClient.DefaultRequestHeaders.Accept.Add(new System.Net.Http.Headers.MediaTypeWithQualityHeaderValue(&quot;application/json&quot;));
  
  response = _oHttpClient.PostAsync(requestURI, content).Result;
  </code></pre>
  <p>Service is clearly getting called through sending a parameter stringcontent.
  I am not allowed to change the way service is getting called.</p>
  <p>I can make changes in service itself.<br />
  POST method is not able to accept in the string format.
  What can be the parameter which I can use over there in POST request which will accept stringcontent??</p>
  <p>Currently it is giving me Error:</p>
  <blockquote>
  <p>Response: UnsupportedMediaType</p>
  <p>{&quot;Message&quot;:&quot;The request entity's media type 'text/plain' is not supported for this resource.&quot;,&quot;ExceptionMessage&quot;:&quot;No MediaTypeFormatter is available to read an object of type 'String' from content with media type 'text/plain'.&quot;,&quot;ExceptionType&quot;:&quot;System.Net.Http.UnsupportedMediaTypeException&quot;,&quot;StackTrace&quot;:&quot;   at System.Net.Http.HttpContentExtensions.ReadAsAsync[T](HttpContent content, Type type, IEnumerable<code>1 formatters, IFormatterLogger formatterLogger, CancellationToken cancellationToken)\r\n   at System.Web.Http.ModelBinding.FormatterParameterBinding.ReadContentAsync(HttpRequestMessage request, Type type, IEnumerable</code>1 formatters, IFormatterLogger formatterLogger, CancellationToken cancellationToken)&quot;}</p>
  </blockquote>