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
serverIServercacheBuildHtmlCache
Methods
CreateClient
#public HttpClient CreateClient()
Returns an HttpClient whose requests flow through the running app's pipeline.
Returns
HttpClientPennington.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)
;
}