The only method I see in HttpResponseHeaders is Add, which takes a string type for the header type. I just wonder if .NET provided a list of states like HttpResponseHeader in a string?
So, I can do:
HttpResponseMessage response = Request.CreateResponse.........;
response.Headers.Add(xxxxx.ContentRange, "something");
I see that there is an Enum list in the HttpResponseHeader, but it does not provide a string value ...
ie HttpResponseHeader.ContentRange, but the correct header line should be Content-Range
Correct me if I am wrong ...
source
share