Function actix_web::guard::Connect

source ·
pub fn Connect() -> impl Guard
Expand description

Creates a guard that matches the CONNECT request method.

§Examples

The route in this example will only respond to CONNECT requests.

use actix_web::{guard, web, HttpResponse};

web::route()
    .guard(guard::Connect())
    .to(|| HttpResponse::Ok());