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

Allow body_params to be any valid json when arg_type is request #6

Open
jeffgrunewald opened this issue Nov 22, 2020 · 0 comments
Open
Labels
enhancement New feature or request

Comments

@jeffgrunewald
Copy link
Owner

By default, the body_params argument for incoming requests is deserialized to a map or is placed into a map with the top-level key of _json_body. However, when the arg_type is request (the user is explicitly selecting to receive the entire %Maverick.Request{} struct as the argument to the internal function), it should be possible to override this behavior and allow the body_params to be any valid json.

In this scenario, the body_params is not coerced to a map and thus not merged into the params map. It will be up to the user to handle the type received in this instance.

The default behavior should still be to coerce the body a map and merge it into the params value.

@jeffgrunewald jeffgrunewald added the enhancement New feature or request label Nov 22, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant