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
Navigate in your browser to the function url. It should show an empty JSON object on screen.
Add '?test1=success' to the query string in the browser. It should show the following object: {"test1":"success"}.
Add &test2 to the query string in the browser. It should show an object that includes the test1, and `test2' keys. It actually does not include test2.
Add &test3= to the query string in the browser. It should show an object that includes the test1, test2, and test3 keys. It actually does not include test2 or test3.
Expected behavior
I expect the query parsing behavior to match the queryParams behavior of the built in URL object - each key in the query shows up in the output, defaulting to an empty string.
Actual behavior
The query object only includes keys that have values other than the empty string.
While this is unavailable, our recommended workaround is to access query param data through context.bindingData.query, where the same information is available)
Empty Query parameters are not correctly parsed into the req.query object.
Investigative information
Repro steps
Provide the steps required to reproduce the problem:
Run the following extremely useful query to JSON function:
index.js:
function.json:
{"test1":"success"}
.&test2
to the query string in the browser. It should show an object that includes thetest1
, and `test2' keys. It actually does not include test2.&test3=
to the query string in the browser. It should show an object that includes thetest1
,test2
, andtest3
keys. It actually does not includetest2
ortest3
.Expected behavior
I expect the query parsing behavior to match the queryParams behavior of the built in URL object - each key in the query shows up in the output, defaulting to an empty string.
Actual behavior
The query object only includes keys that have values other than the empty string.
Known workarounds
Currently I have to do the following:
Related information
Provide any related information
The text was updated successfully, but these errors were encountered: