mirror of
https://github.com/actix/actix-website
synced 2025-02-23 04:33:03 +01:00
14 lines
274 B
Rust
14 lines
274 B
Rust
|
// <brotli>
|
||
|
use actix_web::{
|
||
|
http::ContentEncoding, middleware::BodyEncoding, HttpRequest, HttpResponse,
|
||
|
};
|
||
|
|
||
|
fn index_br(req: HttpRequest) -> HttpResponse {
|
||
|
HttpResponse::Ok()
|
||
|
.encoding(ContentEncoding::Br)
|
||
|
.body("data")
|
||
|
}
|
||
|
// </brotli>
|
||
|
|
||
|
fn main() {}
|