title: How to pass the entire body of a HTTP Post as a single string to WebAPI
body: <p>I have a "lookup" WebAPI service that returns lookup table data like Salutations (Mr Mrs etc) and some that are a lot longer (e.g. business types).</p>
  
  <p>To save myself trouble populating a lookup table manually I added a HttpPost method, assuming I could simply pass a <em>line delimited</em> set of data in the body using Fiddler2. This way I could just paste lists of data into fiddler and add all my lookups in seconds:</p>
  
  <pre><code>    // post api/lookup/lookupName
      [HttpPost]
      public void SaveNewLookups([FromUri(Name="id")] string lookupName, [FromBody]string body)
  </code></pre>
  
  <p>But now matter what I tried for the content type, the body parameter is always null when the method is hit.</p>
  
  <p>I got around it by using the following code to access the raw body text, but it would be nice to get the parameterized version working:</p>
  
  <pre><code>string body = Request.Content.ReadAsStringAsync().Result;
  </code></pre>
  
  <p>I do not want to use a JSON, or other, format for the data as that would defeat the purpose of using simple text lists.</p>