mirror of https://github.com/fafhrd91/actix-web
Apply suggested improvements.
This commit is contained in:
parent
c51c7c7521
commit
18887ac97a
|
@ -212,6 +212,7 @@ where
|
||||||
/// # Examples
|
/// # Examples
|
||||||
///
|
///
|
||||||
/// Global extractor configuration:
|
/// Global extractor configuration:
|
||||||
|
///
|
||||||
/// ```rust
|
/// ```rust
|
||||||
/// use actix_web::{error, web, App, FromRequest, HttpResponse};
|
/// use actix_web::{error, web, App, FromRequest, HttpResponse};
|
||||||
/// use serde_derive::Deserialize;
|
/// use serde_derive::Deserialize;
|
||||||
|
@ -247,6 +248,7 @@ where
|
||||||
/// ```
|
/// ```
|
||||||
///
|
///
|
||||||
/// Per-type extractor configuration:
|
/// Per-type extractor configuration:
|
||||||
|
///
|
||||||
/// ```rust
|
/// ```rust
|
||||||
/// use actix_web::{error, web, App, FromRequest, HttpRequest, HttpResponse};
|
/// use actix_web::{error, web, App, FromRequest, HttpRequest, HttpResponse};
|
||||||
/// use serde_derive::Deserialize;
|
/// use serde_derive::Deserialize;
|
||||||
|
@ -278,7 +280,7 @@ where
|
||||||
/// let app = App::new().service(
|
/// let app = App::new().service(
|
||||||
/// web::resource("/index.html")
|
/// web::resource("/index.html")
|
||||||
/// .app_data(
|
/// .app_data(
|
||||||
/// // Json extractor configuration for only the `Info` struct.
|
/// // JSON extractor configuration for the `Info` struct only.
|
||||||
/// web::Json::<Info>::configure(|cfg| {
|
/// web::Json::<Info>::configure(|cfg| {
|
||||||
/// cfg.limit(4096)
|
/// cfg.limit(4096)
|
||||||
/// .content_type(|mime| { // <- accept text/plain content type
|
/// .content_type(|mime| { // <- accept text/plain content type
|
||||||
|
|
Loading…
Reference in New Issue