[−][src]Crate actix_web_requestid
Request-id.
RequestID provides a "request-id" to a http request. This can be used for tracing, debuging, user error reporting.
In general, you just insert a request-id middleware and initialize it To access requestID data, RequestID extractor must be used.
use actix_web::*; use actix_web_requestid::{RequestID, RequestIDService}; async fn index(id: RequestID) -> String { format!("Welcome! {}", id.get()) } let app = App::new() .wrap(RequestIDService::default()) .service(web::resource("/index.html").to(index));
Structs
RequestID | The extractor type to obtain your identity from a request. |
RequestIDService | Request id middleware |
Constants
REQUEST_ID_HEADER | The header set by the middleware |
Traits
RequestIDMessage |