Book description
Design and build Web APIs for a broad range of clients—including browsers and mobile devices—that can adapt to change over time. This practical, hands-on guide takes you through the theory and tools you need to build evolvable HTTP services with Microsoft’s ASP.NET Web API framework. In the process, you’ll learn how design and implement a real-world Web API.
Ideal for experienced .NET developers, this book’s sections on basic Web API theory and design also apply to developers who work with other development stacks such as Java, Ruby, PHP, and Node.
- Dig into HTTP essentials, as well as API development concepts and styles
- Learn ASP.NET Web API fundamentals, including the lifecycle of a request as it travels through the framework
- Design the Issue Tracker API example, exploring topics such as hypermedia support with collection+json
- Use behavioral-driven development with ASP.NET Web API to implement and enhance the application
- Explore techniques for building clients that are resilient to change, and make it easy to consume hypermedia APIs
- Get a comprehensive reference on how ASP.NET Web API works under the hood, including security and testability
Publisher resources
Table of contents
- Foreword
- Preface
- 1. The Internet, the World Wide Web, and HTTP
- 2. Web APIs
- 3. ASP.NET Web API 101
- 4. Processing Architecture
- 5. The Application
- 6. Media Type Selection and Design
-
7. Building the API
- The Design
- Getting the Source
- Building the Implementation Using BDD
- Navigating the Solution
- Packages and Libraries
- Self-Host
- Models and Services
- Acceptance Criteria
- Feature: Retrieving Issues
- Feature: Creating Issues
- Feature: Updating Issues
- Feature: Deleting Issues
- Feature: Processing Issues
- Conclusion
-
8. Improving the API
- Acceptance Criteria for the New Features
- Implementing the Output Caching Support
- Adding the Tests for Output Caching
- Implementing Cache Revalidation
- Implementing Conditional GETs for Cache Revalidation
- Conflict Detection
- Implementing Conflict Detection
- Change Auditing
- Implementing Change Auditing with Hawk Authentication
- Tracing
- Implementing Tracing
- Conclusion
- 9. Building the Client
- 10. The HTTP Programming Model
- 11. Hosting
- 12. Controllers and Routing
- 13. Formatters and Model Binding
- 14. HttpClient
-
15. Security
- Transport Security
- Using TLS in ASP.NET Web API
-
Authentication
- The Claims Model
- Retrieving and Assigning the Current Principal
- Transport-Based Authentication
- Server Authentication
- Client Authentication
- The HTTP Authentication Framework
- Implementing HTTP-Based Authentication
- Katana Authentication Middleware
- Active and Passive Authentication Middleware
- Web API Authentication Filters
- Token-Based Authentication
- The Hawk Authentication Scheme
- Authorization
- Conclusion
-
16. The OAuth 2.0 Authorization Framework
- Client Applications
- Accessing Protected Resources
- Obtaining Access Tokens
- Authorization Code Grant
- Scope
- Front Channel Versus Back Channel
- Refresh Tokens
- Resource Server and Authorization Server
- Processing Access Tokens in ASP.NET Web API
- OAuth 2.0 and Authentication
- Scope-Based Authorization
- Conclusion
- 17. Testability
- A. Media Types
- B. HTTP Headers
- C. Content Negotiation
- D. Caching in Action
- E. Authentication Workflows
- F. Media Type Specification for application/issue+json
- G. Public-Key Cryptography and Certificates
- Index
- Colophon
- Copyright
Product information
- Title: Designing Evolvable Web APIs with ASP.NET
- Author(s):
- Release date: March 2014
- Publisher(s): O'Reilly Media, Inc.
- ISBN: 9781449337896
You might also like
book
Building Web APIs with ASP.NET Core
Build fully-featured APIs with ASP.NET Core! This all-practical guide is written like a real development project, …
book
Mastering ASP.NET Web API
Leverage ASP.Net Web API to build professional web services and create powerful applications. About This Book …
book
Hands-On RESTful Web Services with ASP.NET Core 3
Get up to speed with the latest features of C# 8, ASP.NET Core 3 and .NET …
book
The Complete ASP.NET Core 3 API Tutorial: Hands-On Building, Testing, and Deploying
Use this ASP.NET Core API tutorial and straightforward step-by-step guide to build, test, and deploy an …