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:
Marcos Adriano
2025-02-03 10:52:45 -03:00
committed by GitHub
parent 4598acd068
commit 364b0f523a
25 changed files with 669 additions and 55 deletions

View File

@@ -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
}

View File

@@ -0,0 +1,9 @@
{
"version": "1",
"name": "bruno-testing",
"type": "collection",
"ignore": [
"node_modules",
".git"
]
}