Expand description
Protocol envelope writer.
Every afhttp command emits one structured value per invocation: a
single line of AFDATA JSON, wrapped with a top-level code field
("fetch", "health", "error", etc.) and a trailing newline. JSON is
the only output format โ one request in, one line of structured JSON out.
Functionsยง
- emit
- Emit a single envelope payload to
writer. The payload is wrapped with a top-levelcodefield and written as one line of JSON followed by a newline. - emit_
error - Convenience: emit an
Errorvalue withcode: "error". - emit_
unredacted - Emit a payload without AFDATA redaction. Use only for commands that require an explicit reveal flag and whose payload contains no unrelated secrets.