mirror of
https://github.com/usebruno/bruno.git
synced 2024-11-28 19:03:15 +01:00
4797119657
* fix: interpolate form-urlencoded and multipart values individually * feat: cli updates
27 lines
526 B
Plaintext
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);
|
|
}
|