mirror of
https://github.com/usebruno/bruno.git
synced 2025-02-03 03:19:16 +01:00
23 lines
352 B
Plaintext
23 lines
352 B
Plaintext
|
meta {
|
||
|
name: echo multipart via scripting
|
||
|
type: http
|
||
|
seq: 10
|
||
|
}
|
||
|
|
||
|
post {
|
||
|
url: {{echo-host}}
|
||
|
body: multipartForm
|
||
|
auth: none
|
||
|
}
|
||
|
|
||
|
assert {
|
||
|
res.body: contains form-data-value
|
||
|
}
|
||
|
|
||
|
script:pre-request {
|
||
|
const FormData = require("form-data");
|
||
|
const form = new FormData();
|
||
|
form.append('form-data-key', 'form-data-value');
|
||
|
req.setBody(form);
|
||
|
}
|