You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Dec 12, 2022. It is now read-only.
At the moment, on POST endpoints, we only accept application/x-www-form-urlencoded parameters for validation in router::handle_request. We don't even check the Content-Type header. Add support for application/json-encoded data as well.
The text was updated successfully, but these errors were encountered:
A really excellent question, because of course JSON data could be totally free-form, and not at all a set of key-value pairs.
This is also a bit bigger than validation. There is a unordered_map of query parameters that gets passed in as well, and that maybe should be populated.
Perhaps what we could do is see if the JSON is an object, and then validate the object members as though they were a listing of key-value pairs. Then also populate the query parameter map.
I'm not 💯 on board with this idea, though. Maybe there are better ideas.
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
At the moment, on POST endpoints, we only accept
application/x-www-form-urlencoded
parameters for validation inrouter::handle_request
. We don't even check theContent-Type
header. Add support forapplication/json
-encoded data as well.The text was updated successfully, but these errors were encountered: