|
In two previous blogs I describe how to use HttpClient as well as how to use the HttpMessageHandler pipeline . What we haven’t done explicitly is showing when and how to use HttpClient , HttpClientHandler , and WebRequestHandler . This is the purpose of this blog. The first thing to remember is that HttpClient sits on top of HttpWebRequest which has a lot of properties for controlling how to deal with requests and responses. However, in order to stay simple, HttpClient doesn’t expose all these properties up front – it would make it unwieldy and show a lot of things that are rarely used. However, if you need to access these properties then there are two ways of doing it: use either HttpClientHandler or WebRequestHandler. Both are HttpMessageHandlers...
|