Measure HTTP
facts.measure.httpMake one HTTP request and record raw status, headers, body, time, and connected IP from the server's network position. Returns the observation without judging success or validating responses.
Instructions
Make one HTTP request and return the raw status, headers and body, with the time it was observed and the IP actually connected to. Measures from the server's network position. It does NOT judge the result: a 500 received cleanly is a successful observation (ok:true, http_status 500). It does not check the status against an expectation, does not validate the body, does not retry, and does not follow redirects unless asked.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| url | Yes | Absolute URL. Subject to the network policy. | |
| body | No | Request body. An object or array is serialized to JSON, with content-type application/json if absent; a string is sent as is. | |
| method | No | HTTP method. | GET |
| headers | No | Request headers. Sent intact; redacted in the output and on disk. | |
| project | Yes | Project this observation belongs to. | |
| timeout_ms | No | Total timeout. | |
| max_body_bytes | No | Body cap. On exceeding it the body is truncated and a warning is emitted. | |
| follow_redirects | No | When false, a 302 is returned as a 302. Each hop is revalidated by the policy. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| ok | Yes | Whether the observation could be taken. NOT a judgement about what was observed: a cleanly received HTTP 500 is ok:true. | |
| data | Yes | The raw observation, or null when error is set. | |
| tool | Yes | Full tool name. | |
| error | Yes | What prevented observing, if anything. | |
| target | Yes | Effective arguments, redacted. | |
| project | Yes | The normalized project. | |
| warnings | Yes | Non-fatal notices. | |
| age_basis | Yes | Which clock the age came from. | |
| request_id | Yes | The request that produced it. | |
| age_seconds | Yes | Seconds since observed_at. | |
| duration_ms | Yes | How long the observation took. | |
| observed_at | Yes | ISO 8601 with offset. | |
| observation_id | Yes | Citable id of this observation. |