bruno/packages/bruno-tests/collection/echo/echo multipart.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

29 lines
516 B
Plaintext

meta {
name: echo multipart
type: http
seq: 8
}
post {
url: {{echo-host}}
body: multipartForm
auth: none
}
body:multipart-form {
form-data-key: {{form-data-key}}
form-data-stringified-object: {{form-data-stringified-object}}
file: @file(bruno.png)
}
assert {
res.body: contains form-data-value
res.body: contains {"foo":123}
}
script:pre-request {
let obj = JSON.stringify({foo:123});
bru.setVar('form-data-key', 'form-data-value');
bru.setVar('form-data-stringified-object', obj);
}