add_http_sampler
Add an HTTP request sampler to an existing JMeter test plan with method, path, headers, body, and optional protocol/port settings to configure API load tests.
Instructions
Add an HTTP request sampler to an existing test plan
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"testfile": "<testfile>",
"name": "<name>",
"path": "<path>",
"method": "<method>"
},
"name": "add_http_sampler"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| body | No | Request body for POST/PUT/PATCH | |
| name | Yes | Name for the HTTP sampler | |
| path | Yes | URL path (e.g., /api/users) | |
| port | No | Target port (optional) | |
| domain | No | Target domain (optional, inherits from defaults) | |
| method | Yes | HTTP method | |
| headers | No | HTTP headers to include | |
| protocol | No | Protocol | http |
| testfile | Yes | Path to the .jmx file | |
| contentType | No | Content-Type header value | |
| useKeepalive | No | Use keep-alive | |
| followRedirects | No | Follow redirects |