Available on crate features
transport and transport-http only.Expand description
§HTTP Transport
HTTP/HTTPS transport for webhook delivery and REST ingest.
§Send
POSTs payload bytes to {endpoint}/{key} using reqwest.
§Receive (requires http-server feature)
Starts an embedded axum HTTP server that accepts POST requests on a
configurable path. Incoming payloads are queued into a bounded
tokio::sync::mpsc channel. recv() drains from this channel.
§Example
ⓘ
use hyperi_rustlib::transport::http::{HttpTransport, HttpTransportConfig};
// Send-only
let config = HttpTransportConfig {
endpoint: Some("http://loader:8080/ingest".into()),
..Default::default()
};
let transport = HttpTransport::new(&config).await?;
transport.send("events", b"{\"msg\":\"hello\"}").await;Structs§
- Http
Token - Commit token for HTTP transport.
- Http
Transport - HTTP/HTTPS transport.
- Http
Transport Config - Configuration for HTTP transport.