1
0
mirror of https://github.com/actix/actix-website synced 2025-03-11 10:42:58 +01:00
2019-06-13 17:10:51 -04:00

11 lines
326 B
Rust

// <example>
use actix_web::{http, HttpRequest, HttpResponse};
pub fn index(req: HttpRequest) -> HttpResponse {
HttpResponse::Ok()
.connection_type(http::ConnectionType::Close) // <- Close connection
.force_close() // <- Alternative method
.finish()
}
// </example>