1
0
mirror of https://github.com/actix/actix-extras.git synced 2025-06-25 09:59:21 +02:00

drop deprecated code

This commit is contained in:
Nikolay Kim
2018-03-29 11:06:44 -07:00
parent ae6c9cb7fa
commit f5636f321b
18 changed files with 61 additions and 152 deletions

View File

@ -172,12 +172,11 @@ and is on for *HTTP/1.1* and *HTTP/2.0*.
```rust
# extern crate actix_web;
# use actix_web::httpcodes::*;
use actix_web::*;
use actix_web::{header, HttpRequest, HttpResponse, httpcodes::HttpOk};
fn index(req: HttpRequest) -> HttpResponse {
HttpOk.build()
.connection_type(headers::ConnectionType::Close) // <- Close connection
.connection_type(header::ConnectionType::Close) // <- Close connection
.force_close() // <- Alternative method
.finish().unwrap()
}

View File

@ -12,8 +12,7 @@ builder instance multiple times, the builder will panic.
```rust
# extern crate actix_web;
use actix_web::*;
use actix_web::headers::ContentEncoding;
use actix_web::{HttpRequest, HttpResponse, header::ContentEncoding};
fn index(req: HttpRequest) -> HttpResponse {
HttpResponse::Ok()
@ -46,8 +45,7 @@ to enable `brotli` use `ContentEncoding::Br`:
```rust
# extern crate actix_web;
use actix_web::*;
use actix_web::headers::ContentEncoding;
use actix_web::{HttpRequest, HttpResponse, header::ContentEncoding};
fn index(req: HttpRequest) -> HttpResponse {
HttpResponse::Ok()