forked from Kong/kong
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(utils) new get_body_info() public API (Kong#2822)
New public API `get_body_info()` to retrieve: - parsed body args (similar to `get_body_args()` (table) - error code due to potential unknown request MIME type - raw body (string) - the request MIME type (as an enum value for programmable usage) New public API enum values: - `req_mime_types`: table containing known request MIME types - `req_body_errors`: table containing enum of req body parsing errors The previous `get_body_args()` API is left untouched from a user's POV to preserve backwards compatibility: it still return only one argument which is the parsed body, or an empty table. The implementation tries to be efficient and lazily reads the request body only when necessary.
- Loading branch information
1 parent
caa91e1
commit 0a2d7c5
Showing
1 changed file
with
102 additions
and
19 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters