Skip to Main Content
Designing Evolvable Web APIs with ASP.NET
book

Designing Evolvable Web APIs with ASP.NET

by Glenn Block, Pablo Cibraro, Pedro Felix, Howard Dierking, Darrel Miller
March 2014
Intermediate to advanced content levelIntermediate to advanced
538 pages
13h 19m
English
O'Reilly Media, Inc.
Content preview from Designing Evolvable Web APIs with ASP.NET

Chapter 4. Processing Architecture

And now for something completely different.

The previous chapter presented the core ASP.NET Web API programming model, introducing the set of fundamental concepts, interfaces, and classes exposed by this framework. Before we address the book’s core subject of designing evolvable Web APIs, this chapter takes a short detour to look under the hood and present the underlying ASP.NET Web API processing architecture, detailing what happens between the reception of an HTTP request and the return of the corresponding HTTP response message. It also serves as a road map for the more advanced ASP.NET Web API features that we will be addressing in the third part of this book.

During this chapter we will be using the HTTP request presented in Example 4-1, associated with the controller defined in Example 4-2, as a concrete example to illustrate the runtime behavior of this architecture. The ProcessesController contains a Get action that returns a representation of all the machine’s processes with a given image name. The exemplifying HTTP request is a GET on the resource identified by http://localhost:50650/api/processes?name=explorer, which represents all the explorer processes currently executing.

Example 4-1. Sample HTTP request message
GET http://localhost:50650/api/processes?name=explorer HTTP/1.1
User-Agent: Fiddler
Host: localhost:50650
Accept: application/json
Example 4-2. Sample controller
public class ProcessesController : ApiController
{
    public ProcessCollectionState ...
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

Mastering ASP.NET Web API

Mastering ASP.NET Web API

Mithun Pattankar, Malendra Hurbuns
Enterprise Application Development with C# 9 and .NET 5

Enterprise Application Development with C# 9 and .NET 5

Ravindra Akella, Rishabh Verma, Arun Kumar Tamirisa, Suneel Kumar Kunani, Bhupesh Guptha Muthiyalu

Publisher Resources

ISBN: 9781449337919Errata Page