c# - System.Net.Http.HttpClient vs Windows.Web.Http.HttpClient - What are the main differences? -
when developing .net 4.5 desktop apps windows have been used use system.net.http.httpclient communication backend web api. developing windows store app , has noticed existence of windows.web.http.httpclient. have looked information on main differences between 2 clients without luck.
from msdn know should start using windows.web.http.httpclient in windows store app since system.net.http.httpclient might removed api:
note system.net.http , system.net.http.headers namespace might not available in future versions of windows use windows store apps. starting windows 8.1 , windows server 2012 r2, use windows.web.http.httpclient in windows.web.http namespace , related windows.web.http.headers , windows.web.http.filters namespaces instead windows runtime apps.
but apart information, have hard time figuring out main differences , main benefit of using windows.web.http.httpclient? add don't got in system.net.http.httpclient?
answers backed official documentation appreciated.
there not find it. things come in mind:
- the new api doesn't have dependencies low-level windows functions, current api does.
- the new api better capable handling new methods related http protocol, websockets, etc.
some useful information can found in this blog post referenced this build video. speak better cache control, , way add filters authentication, easy access cookies, reconnecting, etc.
Comments
Post a Comment