liveBook · Manning

DelegatingHandler

DelegatingHandler is a .NET HttpMessageHandler base class that forwards requests and responses to an inner handler while permitting additional processing.

How 2 Manning books explain it

.NET MAUI in Action

A delegating handler is an HTTP message handler that can inspect or modify a request or response before passing it to another handler.

How it is used
Automates authenticated HTTP requests by attaching access-token headers through an HttpClient handler pipeline.
How deep it goes
Explains inheritance, SendAsync, request modification, dependency-injection registration, named clients, and handler chaining.
Examples
Demonstrates MauiStockTake's AuthHandler, AuthService login flow, named authenticated client, and chained request handlers.
What you can do after
Configure an HttpClient that automatically adds authentication headers and composes multiple request policies.

Read how .NET MAUI in Action explains DelegatingHandler →

ASP.NET Core in Action, 3e

DelegatingHandler is a .NET HttpMessageHandler base class that forwards processing to an inner handler while allowing additional behavior.

How it is used
Applies cross-cutting behavior such as authentication, logging, and metrics to requests made through named or typed clients.
How deep it goes
Explains derivation, SendAsync, dependency-injection registration, pipeline ordering, and request-response flow.
Examples
Demonstrates an API-key handler and its registration alongside transient error handling for ExchangeRatesClient.
What you can do after
Build custom request behavior, register it with dependency injection, and apply it to selected HttpClient pipelines.

Read how ASP.NET Core in Action, 3e explains DelegatingHandler →

Related concepts

These guides are generated from the text of Manning books by Manning's knowledge graph and link to the sections they draw on. The full books are available on liveBook and at manning.com.