1
Vote

HttpContent.Read* methods return empty content when using parameter binding in Web API controller

description

Repro steps

  1. In a Web API application, add a complex type parameter to a controller method.
  2. In the controller method, read the content, e.g. with Request.Content.ReadAsStringAsync.
  3. Run the app, and send an HTTP request with application/json content to the URI handled by the controller method.

Expected behavior

The content returned by the HttpContent.Read* method represents the actual request's content.

Actual behavior

The content returned by HttpContent.Read* is empty.

comments