Binary, Multipart, and Raw Payload Handling
Examples demonstrating different payload types for various testing scenarios.
1. Binary Payload Example
name: BinaryPayloadExample
rounds:
- name: BinaryPayloadRound
numberOfClients: 5
arrivalDelay: 3000
iterations:
- name: BinaryPayloadIteration
httpRequest:
url: https://echo.free.beeceptor.com
headers:
content-type: application/pdf
httpMethod: PUT
payload:
file: img001.pdf
saveResponse: true
mode: R
requestCount: 1
Purpose: Sends a binary file as the payload. The content type is automatically detected based on the file.
2. Multipart Payload Example
name: MultipartPayloadExample
rounds:
- name: MultipartPayloadRound
numberOfClients: 5
arrivalDelay: 3000
iterations:
- name: MultipartPayloadIteration
httpRequest:
url: https://echo.free.beeceptor.com
httpMethod: POST
saveResponse: true
payload:
multipart:
fields:
- name: field1
value: "sample value"
contentType: text/plain
- name: field2
value: "another value"
contentType: application/json
files:
- name: file1
path: img001.pdf
contentType: application/pdf
- name: file2
path: img002.pdf
contentType: application/pdf
mode: R
requestCount: 1
Purpose: Demonstrates how to send multipart payloads with both text fields and files.
3. Raw Payload Example
name: RawPayloadExample
rounds:
- name: RawPayloadRound
numberOfClients: 5
arrivalDelay: 3000
iterations:
- name: RawPayloadIteration
httpRequest:
url: https://echo.free.beeceptor.com
httpMethod: POST
payload:
type: Raw
raw: |
{
"key1": "value1",
"key2": "value2",
"nested": {
"key3": "value3"
}
}
mode: R
requestCount: 1
Purpose: Sends raw JSON data in the request payload. This is useful for API endpoints requiring structured payloads like JSON or XML.