mirror of
https://github.com/fafhrd91/actix-web
synced 2025-09-01 01:16:59 +02:00
rename App::register_data to App::app_data and HttpRequest::app_data returns Option<&T> instead of Option<&Data<T>>
This commit is contained in:
@@ -176,7 +176,7 @@ impl FromRequest for Bytes {
|
||||
/// fn main() {
|
||||
/// let app = App::new().service(
|
||||
/// web::resource("/index.html")
|
||||
/// .data(String::configure(|cfg| { // <- limit size of the payload
|
||||
/// .app_data(String::configure(|cfg| { // <- limit size of the payload
|
||||
/// cfg.limit(4096)
|
||||
/// }))
|
||||
/// .route(web::get().to(index)) // <- register handler with extractor params
|
||||
|
Reference in New Issue
Block a user