bruno/packages/bruno-tests/collection/echo/echo form-url-encoded.bru
lohit 4797119657
fix: interpolate form-urlencoded and multipart formdata values individually (#3237)
* fix: interpolate form-urlencoded and multipart values individually

* feat: cli updates
2024-10-01 18:24:03 +05:30

27 lines
526 B
Plaintext

meta {
name: echo form-url-encoded
type: http
seq: 9
}
post {
url: {{echo-host}}
body: formUrlEncoded
auth: none
}
body:form-urlencoded {
form-data-key: {{form-data-key}}
form-data-stringified-object: {{form-data-stringified-object}}
}
assert {
res.body: eq form-data-key=form-data-value&form-data-stringified-object=%7B%22foo%22%3A123%7D
}
script:pre-request {
let obj = JSON.stringify({foo:123});
bru.setVar('form-data-key', 'form-data-value');
bru.setVar('form-data-stringified-object', obj);
}