Sign In Start Free Trial
Account

Add to playlist

Create a Playlist

Modal Close icon
You need to login to use this feature.
  • Book Overview & Buying Building Web Services with Windows Azure (new)
  • Table Of Contents Toc
Building Web Services with Windows Azure (new)

Building Web Services with Windows Azure (new)

By : Kaufman, Nikhil Sachdeva
4 (3)
close
close
Building Web Services with Windows Azure (new)

Building Web Services with Windows Azure (new)

4 (3)
By: Kaufman, Nikhil Sachdeva

Overview of this book

If you are a .NET developer who wants to develop end-to-end RESTful applications in the cloud, then this book is for you. A working knowledge of C# will help you get the most out of this book.
Table of Contents (12 chapters)
close
close
6
5. Connecting Applications with Microsoft Azure Service Bus
11
Index

HTTP 2.0

HTTP 2.0 is the next planned version of the HTTP protocol specification and is an attempt to optimize the usage of network resources and reduce latency through header compressions and pooling multiple connections over the same channels. The initiative is spearheaded by Google and Mozilla research teams and as of today, is in a working draft state. The good news is that HTTP 2.0 is going to retain all the goodness of HTTP 1.1 while making it more performant over the wire through efficient processing of messages. Since HTTP 2.0 is still in the making, we will refrain from using it for the scope of this book. However, if you are enthusiastic to know more about HTTP 2.0, you can take a look at the current draft of the specification at http://http2.github.io/http2-spec/.

For the scope of this book, HTTP always refers to HTTP 1.1 specification of the protocol.

HTTP and .NET

Starting from .NET 4.5, a new namespace and assembly was added as part of the framework, System.Net.Http. The resemblance of the types in this namespace may look behaviorally similar to those defined in ASP.NET System.Web.Http namespace; however, the addition of this namespace marks a big difference in the development of HTTP services.

Firstly, it enables unified communication over HTTP by providing a set of abstract types. These types allow any .NET application to access HTTP services in a consistent way, for example, now both the client and server can use the same HTTP programming model for better development experience. Secondly, it has been written to target modern HTTP apps such as Web API and mobile development, this signifies the investment of Microsoft in making HTTP services a first-class citizen.

Some of the key types defined in this namespace are:

Type

Description

HttpClient

This enables primitive operations for sending HTTP requests and receiving HTTP responses from a resource identified by a URI.

HttpRequestMessage

This represents the HTTP request message from a client.

HttpResponseMessage

This represents the HTTP response message received from an HTTP request.

HttpContent

This is a base class that represents an HTTP entity body and any content headers.

HttpMessageHandler

This is the base type for all message handlers and this will be used to define all message handlers. Message handlers may be used to create server-side or client-side handlers.

The server-side handler works with the hosted model chain and handles incoming client requests (HttpServer and HttpSelfHostServer). It determines the correct route for the request (HttpRoutingDispatcher) and dispatches the request to the controller (HttpControllerDispatcher).

The HttpClient type uses client-side message handlers to process requests. The default handler HttpClientHandler is responsible to send the request and get the response from the server.

We may, of course, hook our custom controllers in the pipelines, for example, to validate, modify, or log the requests.

Note

For a complete list of all types available in the System.Net.Http namespace, please visit http://msdn.microsoft.com/en-us/library/system.net.http(v=vs.110).aspx.

We will see in the later sections that the ASP.NET Web API also leverages some of the System.Net.Http types for communication over HTTP.

CONTINUE READING
83
Tech Concepts
36
Programming languages
73
Tech Tools
Icon Unlimited access to the largest independent learning library in tech of over 8,000 expert-authored tech books and videos.
Icon Innovative learning tools, including AI book assistants, code context explainers, and text-to-speech.
Icon 50+ new titles added per month and exclusive early access to books as they are being written.
Building Web Services with Windows Azure (new)
notes
bookmark Notes and Bookmarks search Search in title playlist Add to playlist font-size Font size

Change the font size

margin-width Margin width

Change margin width

day-mode Day/Sepia/Night Modes

Change background colour

Close icon Search
Country selected

Close icon Your notes and bookmarks

Confirmation

Modal Close icon
claim successful

Buy this book with your credits?

Modal Close icon
Are you sure you want to buy this book with one of your credits?
Close
YES, BUY

Submit Your Feedback

Modal Close icon
Modal Close icon
Modal Close icon