mirror of
https://github.com/usebruno/bruno.git
synced 2026-06-30 16:14:06 +00:00
feat: raw binary files handling in request body (#3734)
-------------- Co-authored-by: lohit <lohit@usebruno.com> Co-authored-by: Anoop M D <anoop.md1421@gmail.com>
This commit is contained in:
@@ -0,0 +1,27 @@
|
||||
meta {
|
||||
name: binary-files-types
|
||||
type: http
|
||||
seq: 1
|
||||
}
|
||||
|
||||
post {
|
||||
url: {{host}}/api/binaryFile/binary-file-types
|
||||
body: binaryFile
|
||||
auth: none
|
||||
}
|
||||
|
||||
body:binary-file {
|
||||
file1: @file() @contentType()
|
||||
file2: @file(binaryFile/binary-file.json) @contentType()
|
||||
file3: @file(binaryFile/binary-file.json) @contentType(application/json)
|
||||
}
|
||||
|
||||
assert {
|
||||
res.status: eq 200
|
||||
res.body.find(p=>p.name === 'file1').value[0]: isUndefined
|
||||
res.body.find(p=>p.name === 'file1').contentType: isUndefined
|
||||
res.body.find(p=>p.name === 'file2').value[0]: eq binaryFile/binary-file.json
|
||||
res.body.find(p=>p.name === 'file2').contentType: eq isUndefined
|
||||
res.body.find(p=>p.name === 'file3').value[0]: eq binaryFile/binary-file.json
|
||||
res.body.find(p=>p.name === 'file3').contentType: eq application/json
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
{
|
||||
"version": "1",
|
||||
"name": "bruno-testing",
|
||||
"type": "collection",
|
||||
"ignore": [
|
||||
"node_modules",
|
||||
".git"
|
||||
]
|
||||
}
|
||||
Reference in New Issue
Block a user