LiveHttpResponse
The HTTP-transport-agnostic response envelope for a live interaction — a status code plus a JSON-serializable body, constructed only via {@see ok()} or {@see error()} so every response carries the `ok` flag the client-side runtime branches on.
LiveHttpResponse::ok()
public static function ok(array $body): selfA 200 success response; `$body` is merged after `'ok' => true`.
Parameters
| Name | Type | Description |
|---|---|---|
| $body | array<string, mixed> |
LiveHttpResponse::error()
public static function error(int $status, string $code, string $message, array $details = []): selfAn `'ok' => false` error response for the given HTTP `$status`, a machine-readable `$code`, a human-readable `$message`, and optional structured `$details`.
Parameters
| Name | Type | Description |
|---|---|---|
| $status | int | |
| $code | string | |
| $message | string | |
| $details | array<string, mixed> |