Skip to main content

router_transport

Function router_transport 

Source
pub fn router_transport(router: Router) -> impl FetchTransport
Expand description

Serve host fetches with an axum Router.

This is service_transport for a router: register it with fetchlet::OriginRouter::internal to share one router between public HTTP and in-process fetches. Handlers read the trusted Context with Option<Extension<fetchlet::Context>>.