Skip to Main Content
Microsoft .NET Framework 4.5 Quickstart Cookbook
book

Microsoft .NET Framework 4.5 Quickstart Cookbook

by Jose Luis Latorre
May 2013
Intermediate to advanced content levelIntermediate to advanced
226 pages
4h 16m
English
Packt Publishing
Content preview from Microsoft .NET Framework 4.5 Quickstart Cookbook

Using the HttpClient and the new System.Net.Http namespaces

HttpClient is a new .NET 4.5 class using the HTTP protocol, similar to WebClient or HttpWebRequest. A highlight of this class is the full support of Async.

In fact it's not such a novelty, since we already had it on the REST Starter Kit and the implementation of the .NET 4.0 We API.

The HttpClient class resides on the System.Net.Http namespace, which is a brand new .NET 4.5 namespace. Basically, we use HttpClient to create HTTP requests, manage the response, and process the response's content.

Some of the most interesting capabilities are:

  • Helper methods that create requests and process the responses
  • The possibility of defining a default header to apply to all sent messages
  • Timeout and cancellation ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

.NET Core 2.0 By Example

.NET Core 2.0 By Example

Neha Shrivastava, Rishabh Verma
Introducing .NET 4.5

Introducing .NET 4.5

Alex Mackey, William Tulloch, Mahesh Krishnan
ASP.NET 4 Unleashed

ASP.NET 4 Unleashed

Stephen Walther, Kevin Hoffman, Nate Dudek
Microsoft® .NET Compact Framework (Core Reference)

Microsoft® .NET Compact Framework (Core Reference)

Andy Wigley, Stephen Wheelwright, Robert Burbidge, Rory MacLoed, Mark Sutton

Publisher Resources

ISBN: 9781849686983Other