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
The form-encode and form-decode functions are designed to encode and decode data in the application/x-www-form-urlencoded format. The format used by the nested-params middleware is a custom format on top of that. If you want functions to encode/decode in the format of the nested-params middleware, then the functions should be placed in the nested-params middleware namespace.
The first example you give should probably either raise an error or put the edn-encoded map in, instead.
Activity
weavejester commentedon Mar 5, 2018
The
form-encodeandform-decodefunctions are designed to encode and decode data in theapplication/x-www-form-urlencodedformat. The format used by the nested-params middleware is a custom format on top of that. If you want functions to encode/decode in the format of the nested-params middleware, then the functions should be placed in the nested-params middleware namespace.The first example you give should probably either raise an error or put the edn-encoded map in, instead.
devurandom commentedon Apr 28, 2023
This would be a very useful addition. Could it be implemented by adding an optional flag to
ring.util.codec/form-encode?In version 1.2.0 this does not raise an error:
Should this issue be reopened?
weavejester commentedon Apr 28, 2023
I think open a separate issue, one specifically for better handling the error caused by nested maps.
devurandom commentedon May 1, 2023
Done: #42