1
0
mirror of https://github.com/actix/actix-website synced 2025-06-29 08:14:58 +02:00

Fixes missed example and config for extractors.

This commit is contained in:
Cameron Dershem
2019-06-20 04:26:34 -04:00
parent c4c32091a6
commit 339ac43814
2 changed files with 25 additions and 2 deletions

View File

@ -62,8 +62,8 @@ the type `T` must implement the `Deserialize` trait from *serde*.
Some extractors provide a way to configure the extraction process. Json extractor
[*JsonConfig*](https://docs.rs/actix-web/1.0.2/actix_web/web/struct.JsonConfig.html) type
for configuration. When you register a handler using `Route::with()`, it returns a
configuration instance. In case of a *Json* extractor it returns a *JsonConfig*. You can
for configuration. To configure an extractor, pass it's configuration object to the resource's
`.data()` method. In case of a *Json* extractor it returns a *JsonConfig*. You can
configure the maximum size of the json payload as well as a custom error handler function.
The following example limits the size of the payload to 4kb and uses a custom error handler.