bruno
bruno copied to clipboard
Error invoking remote method 'renderer:new-request': TypeError: Cannot read properties of null (reading 'includes'), when create `form-urlencoded` request from cURL
I have checked the following:
- [X] I use the newest version of bruno.
- [X] I've searched existing issues and found nothing related to my issue.
Describe the bug
v1.17.0 on MacOS 10.15.7
When create a new form-urlencoded request from cURL, toast that Error invoking remote method 'renderer:new-request': TypeError: Cannot read properties of null (reading 'includes').
.bru file to reproduce the bug
No response
Screenshots/Live demo link
How to reproduce the problem?
Some parameter(s) in form-urlencoded type data missing =, like param2 parameter below.
e.g.:
curl 'https://example.com/api' \
-H 'content-type: application/x-www-form-urlencoded' \
--data-raw 'param1=1¶m2'
Why?
- When parsing
cURLcommand, app will usequery-stringto parseform-urlencodedtype data string. If some parameter(s) inform-urlencodedtype data string missing=,query-stringwill set value asnull(Missing=should benull· sindresorhus/query-string).
But it isn't a bug, just a feature following W3 specification(https://www.w3.org/TR/2012/WD-url-20120524/#collect-url-parameters).
- When convert json to
brutype data inbruno-langv2, will executevalue.includes('\n');, then throw error.
I have merged the PR @leonardoyhl ! Thanks for taking time to go through the W3 spec and make these fixes in Bruno!
This will get shipped in the release scheduled to go out today.