HTTP_JSON
Written by
Updated at December 15, 2023
Type of test data for the Pandora load generator. It represents HTTP requests in a JSON structure.
The test data type is specified when creating a test.
Data format:
{"host": "example.com", "method": "GET", "uri": "/api/url1", "tag": "url1", "headers": {"User-agent": "Tank", "Connection": "close"}}
{"host": "example.com", "method": "POST", "uri": "/api/url2", "tag": "url2", "headers": {"User-agent": "Tank", "Connection": "close"}, "body": "body_data"}
Where:
host
: Value of theHost
headermethod
: HTTP request methoduri
: Request URItag
: Request tag to display in reportsheaders
: Request headersbody
: POST request body; specified ifmethod=POST
When passing a JSON structure in the body
parameter, use the \
character to escape quotation marks:
{"host": "example.com", "method": "POST", "uri": "/api/url2", "tag": "url2", "headers": {"User-agent": "Tank", "Connection": "close"}, "body": "{\"data\": \"some_data\"}"}
When configuring the Pandora load generator using a file, specify the http/json
type in the ammo
section:
config_content:
pools:
- id: HTTP
ammo:
type: http/json
file: ./ammo.json
When uploading a file with test data via the management console, this is done automatically.