1
0
mirror of https://github.com/actix/actix-website synced 2025-03-12 03:02:59 +01:00

11 lines
326 B
Rust
Raw Normal View History

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