This documentation is also published as Markdown for efficient machine reading: the whole site is indexed at /llms.txt, and every page has a clean Markdown copy under /_llms/. These are generated from the same source and cost far fewer tokens to read than this rendered HTML.

Skip to main content Skip to navigation

HttpDispatcher Pennington.Infrastructure

Default IInProcessHttpDispatcher. Inspects the registered IServer and returns an in-memory client when it's a TestServer, or a socket-bound client pointing at Kestrel's listening address otherwise.

Constructors

HttpDispatcher

#
public HttpDispatcher(IServer server, BuildHtmlCache cache)

Initializes the dispatcher with the host's registered IServer and the shared render cache.

Parameters

server IServer
cache BuildHtmlCache

Methods

CreateClient

#
public HttpClient CreateClient()

Returns an HttpClient whose requests flow through the running app's pipeline.

Returns

HttpClient

Pennington.Infrastructure.HttpDispatcher

namespace Pennington.Infrastructure;

/// Default IInProcessHttpDispatcher. Inspects the registered IServer and returns an in-memory client when it's a TestServer, or a socket-bound client pointing at Kestrel's listening address otherwise.
public class HttpDispatcher
{
    /// Returns an HttpClient whose requests flow through the running app's pipeline.
    
public HttpClient CreateClient()
; /// Initializes the dispatcher with the host's registered IServer and the shared render cache.
public HttpDispatcher(IServer server, BuildHtmlCache cache)
; }