title: Deserlize BSON into objects in client from WebAPI
body: <p>I have a web API that is currently returning a BSON response from a POST. </p>
  
  <p>Normally I have the WebAPI returning JSON and I just do this in the client to deserialize it into my C# object or objects.</p>
  
  <pre><code>var result = await GetApiClient().PostAsJsonAsync("api/Test/GetImages", args);
  
  if (result.IsSuccessStatusCode)
       return await result.Content.ReadAsAsync&lt;T&gt;();
  </code></pre>
  
  <p>I am now doing this to get the BSON response:</p>
  
  <pre><code>MediaTypeFormatter bsonFormatter = new BsonMediaTypeFormatter();
  var result = await GetApiClient().PostAsync("api/Test/GetImages", args, bsonFormatter);
  
      if (result.IsSuccessStatusCode)
           return await result.Content.ReadAsAsync&lt;T&gt;();
  </code></pre>
  
  <p>The JSON works fine, but the BSON errors when reading the content:</p>
  
  <pre><code>No MediaTypeFormatter is available to read an object of type IEnumerable1 from content with media type 'application/bson'
  </code></pre>
  
  <p>I am 100% certain I am getting BSON back, I am just not sure how to deserialize it into objects now?</p>