I tried to read the value of the Content-Type header in the user delegation handler in the ASP.NET Web API. When I requested the request.Headers collection, the header value was not there. However, it was contained in request.Content.Headers . Other custom headers (such as Content-Test ) starting with Content- were only available in request.Headers ; Content-Length , on the other hand, could only be found in request.Content.Headers , just like Content-Type .
Is it correct to assume that the web API places all known content headers in the request.Content.Headers collection, putting all other headers in request.Headers ?
source share