In this chapter, we will cover how to use the HttpClient
and new System.Net.Http
namespaces.
.NET 4.5 brings improved capabilities in networking such as more support for internationalization, protocol improvements, better performance, and new programming interfaces for HTTP and WebSockets. The main improvement is that it now fully supports WebSockets and the complete HTTP standard.
.NET Framework 4.5 enhances internationalization with the following features
Regarding protocol support, the additions are:
As for new namespaces, we now have System.Net.Http
, System.Net.Http.Headers
, and System.Net.WebSockets
namespaces. We have improvements on classes such as HttpListener
, Uri
, Socket
, and on namespaces such as System.Net.Mail
or System.Net.NetworkInformation
.
We will now explore in practice some of these features to get a solid grasp on the new capabilities.