1
0
mirror of https://github.com/actix/actix-website synced 2025-03-03 07:37:33 +01:00

11 lines
322 B
Rust
Raw Normal View History

2018-05-23 20:39:15 -07:00
// <example>
use actix_web::{http, HttpRequest, HttpResponse};
fn index(req: HttpRequest) -> HttpResponse {
HttpResponse::Ok()
.connection_type(http::ConnectionType::Close) // <- Close connection
.force_close() // <- Alternative method
.finish()
}
// </example>