Combines loading payload and making request in one step.
Supports {{VARIABLE_NAME}} for env vars and {{alias:NAME}} for aliases.
Parameters
endpoint: string
API endpoint (supports {{VARIABLE_NAME}} placeholders)
fileName: string
Path to the JSON file
Returns void
Example
When I k6 make a POST request to "/users" with payload from "payload.json"
When I k6 make a POST request to "/api/users" with payload from "data/create-user.json"
Makes a POST request using a payload.json file.
Combines loading payload and making request in one step. Supports
{{VARIABLE_NAME}}for env vars and{{alias:NAME}}for aliases.