The WebApi parameter Bindings passes null values to methods when the client fails to specify the content-type i.e. content-type: application/json
I would consider this to be a weakness in the WebApi implementation and would expect the WebApi to detected that the client has called the WebApi without specifying a content-type and report the back with an HTTP status code of BadRequest with a description of ' "content-type" header missing.'
This of course should be allowed to be overridden by the developer, if required.
I would consider this to be a weakness in the WebApi implementation and would expect the WebApi to detected that the client has called the WebApi without specifying a content-type and report the back with an HTTP status code of BadRequest with a description of ' "content-type" header missing.'
This of course should be allowed to be overridden by the developer, if required.