HTTP executor plugin for ApiQube.
This is the first-party WASM plugin for the ApiQube testing engine. Engine routes any test whose target starts with http:// or https:// to this plugin via the host capability.
http, https
http (provided by the engine via host_http_request).
The HTTP method and path live on the core TestInput.Method / TestInput.Resource fields, not in fields: — the same as for any other ApiQube plugin. The fields below are HTTP-specific extensions:
| Field | Type | Description |
|---|---|---|
body |
any | Request body. Marshaled to JSON unless Content-Type overrides. |
query |
map | URL query parameters as key-value pairs. |
url |
string | Absolute URL override; takes precedence over target+resource. |
followRedirects |
bool | Whether to follow HTTP redirects (default true). |
maxRedirects |
number | Maximum number of redirects to follow (default 10). |
target: http://localhost:8081
tests:
- name: Create user
method: POST
resource: /users
body:
name: "{{ fake.name }}"
email: "{{ fake.email }}"
expect:
status: 201
- name: Search active users
method: GET
resource: /users
query:
status: active
limit: 50
expect:
status: 200
body.length: "> 0"tinygo build -o plugin-http.wasm -target=wasi ./
CI builds and uploads the artifact on every push.
go test ./...
The Go-side tests cover URL composition, header handling, body encoding, the contract types, and the WASM exports through their JSON wire interface. End-to-end tests run inside the engine module against a CI-built plugin-http.wasm.
qube plugin install plugin-http.wasm