Skip to main content

Module middleware

Module middleware 

Source
Expand description

Transport-boundary middleware for DynHttpClient. Attach hooks with with_middleware.

use rig_http::http_client::middleware::HttpMiddleware;

struct PassThrough;
impl HttpMiddleware for PassThrough {}

Structs§

Exchange
The request a hook runs for: its method, URI and extensions, which carry what the caller attached to it, such as the model call a request serves (rig-core’s serve::Serving). Built by DynHttpClient; a field added later breaks no hook.

Traits§

HttpMiddleware
Transport-boundary hooks applied by DynHttpClient around every request.