Feb 24, 2012 10:24 PM|davebettin|LINK
Please let me know if this should be directed elsewhere.
I have been using the latest drop of the new HttpClient and I wanted to mention a bug and a couple of design issues.
Due to HttpClient still using the old "WebRequest" curmudgeon under the hood, I am running into the "This header must be modified using the appropriate property" exception when trying to set the
If-Modified-Since request header. Is this a known issue?
Http Response Headers - Why are the headers located in two different places within the API? They are located within the
HttpResponseMessage Headers property and the HttpContent Headers property. I do understand the distinction (The etags property doesn't make since within this distinction, though), but it is confusing to the end user. At the
end of the day, a http response header is a http response header; simplify the API discoverability, don't make it more difficult.
Http Request - This might be a little nit-picky, but why are the http response headers available on the
HttpRequestMessage class. For example, I can get to the
LastModified header off of the Content property; maybe it makes sense to simplify and reduce the API surface.