Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: require an extended body parser #532

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from
Draft

Commits on Aug 11, 2024

  1. feat: require an extended body parser

    This changes `extended` to be settable to a custom body parser, or
    `false`.
    
    When `false`, the simple parser (`node:querystring`) will be used which
    supports the following syntax:
    
    - `foo=a&foo=b` becomes `{"foo":["a","b"]}`
    - `foo=bar` becomes `{"foo":"bar"}`
    
    Otherwise, it must be a function which parses the given string:
    
    ```ts
    {
      "extended": (bodyStr) => {
        const params = new URLSearchParams(bodyStr);
        return convertURLSearchParamsToObject(params);
      }
    }
    ```
    43081j committed Aug 11, 2024
    Configuration menu
    Copy the full SHA
    19ff6bf View commit details
    Browse the repository at this point in the history