Expand description
HTTP adapter: executes operations as HTTP requests.
Op template fields map to HTTP request components:
method— GET, POST, PUT, DELETE, PATCH, HEAD (default: GET)uriorurl— the request URL (required)body— request body (for POST/PUT/PATCH)content_type— Content-Type header (default: application/json)headers— additional headers as “Name: Value” linesok_status— expected status codes (default: 200-299)
Example workload:
bindings: |
user_id := mod(hash(cycle), 1000000)
ops:
read:
method: GET
uri: "http://localhost:8080/api/users/{user_id}"
write:
method: POST
uri: "http://localhost:8080/api/users"
body: '{"id": {user_id}, "name": "user_{user_id}"}'
content_type: application/jsonStructs§
- Http
Adapter - The HTTP adapter: executes ops as HTTP requests.
- Http
Config - Configuration for the HTTP adapter.