rig-http
The transport contracts every Rig provider sends through:
http_client:HttpClientExt, the trait a transport implements;DynHttpClient, an erased client with middleware (HttpMiddleware); request framing, multipart forms and the error type;ws_client(featurewebsocket): the websocket connection contract the Responses WebSocket session is written against;wasm_compat: theSend/Syncbounds and boxed futures that relax on browser wasm;runtime(featuretokio, native): the tokio runtime the bundled transports poll their I/O in, from any executor.
This crate has no transport of its own. rig-reqwest (HTTP) and
rig-tungstenite (websocket) are the bundled transports, and depend only on
this crate. rig-core re-exports these modules at rig_core::http_client,
rig_core::ws_client and rig_core::wasm_compat, so provider code and
users reach them there.
A transport author depends on rig-http alone and implements
HttpClientExt:
use ;
The test-utils feature adds HTTP client doubles for tests.