Automatically urlencoded request bodies encode null as <nil>
and objects as map[...]
#1185
Labels
bug
evaluation needed
proposal needs to be validated or tested before fully implementing it in k6
help wanted
new-http
issues that would require (or benefit from) a new HTTP API
Based on #1184, the following script:
Will produce:
As can be seen by httpbin's response, k6 automagically encodes the object as
x-www-form-urlencoded
, which is due to this lines https://github.com/loadimpact/k6/blob/1d6fb7f668aa089b374ee8ca35de2a34d77d29ce/js/modules/k6/http/request.go#L148-L151A quick proposal is to check for
null
and return""
but I am not certain so we need to read some RFCs, probably or something.The text was updated successfully, but these errors were encountered: