Changes for version 0.0.5 - 2026-08-06
- ENHANCEMENT
- The POST/PUT/PATCH request bodies can now be in the application/x-www-form-urlencoded format instead of being restricted to JSON. The body parser examines the Content-Type header; therefore, the charset suffix (such as ";charset=utf-8") will be ignored. Furthermore, the body parser will process url-encoded data in the same manner as query string in which the body is decoded using percent-/plus-decode algorithm. However, the same Type::Tiny validation can be applied in either format and the handler will receive a HashRef object as a result of a processed request regardless of the sent format.
- It is backward compatible, i.e., if the Content-Type header is not set or not recognised, the body will be processed in the same way as before. In particular, the default behavior of parsing requests is JSON parsing.
- Also the new feature was tested in t/10-form_urlencoded_body.t.
- The plugin is documented in the `body` configuration option as well as in the ERROR HANDLING section. The decision to implement this feature was influenced by the example provided on a PAGI::FastAPI::Security page.
Documentation
Modules
Asynchronous, Type-Safe Micro-Framework with Dependency Injection and OpenAPI & Swagger UI
Request and Response Lifecycle Context for PAGI::FastAPI
Dependency Injection Wrapper for PAGI::FastAPI