http-body metadata schema, v1
$id | https://github.com/buildwarden/buildwarden/schemas/v1/http-body.json |
| Machine schema | metadata-http-body/v1.schema.json |
| Applies to | checkpoint or close records whose payload is an HTTP request or response body |
| Default header index | 2 (see the ledger spec's Default Schemas) |
Purpose
Carries the response status alongside a body, so a reader can tell a successful download from an error page without the response headers.
Fields
{
"status": 200
}
| Field | Type | Required | Description |
|---|---|---|---|
status | unsigned int, 100–599 | no | HTTP response status code. Present only for response bodies; a request body's metadata is an empty map. |
No other fields are allowed.
Known producer deviation
Ledgers written by relays v0.2.0 through v0.6.0 carry a path text field in
some http-body close records of relay-served inputs, under this document's
$id at index 2. From v0.2.0 it is on the close of each build-context file. In
v0.6.0 it is also on the close of the build script (unreleased builds from
b716d9e onward) and of the bootstrap config (from 5ab774b onward). It
duplicates the path of the matching open record's url in its
http-open metadata. Readers ignore it.
Current relays write {"status": 200} for these records instead.