Crate actix_web_requestid[][src]

Expand description

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

The extractor type to obtain your identity from a request.

Request id middleware

Constants

The header set by the middleware

Traits