Skip to main content

Module http_command

Module http_command 

Source
Expand description

Lua-exposed HTTP client for orcs.http().

Provides a blocking HTTP client (via ureq) exposed to Lua as orcs.http(method, url, opts). Gated by Capability::HTTP.

§Design

Rust owns the transport layer (TLS, timeout, error classification). Lua owns the application logic (request construction, response parsing).

Lua: orcs.http("POST", url, { headers={...}, body="...", timeout=30 })
  → Capability::HTTP gate (ctx_fns / child)
  → http_request_impl (Rust/ureq)
  → { ok, status, headers, body, error, error_kind }

Functions§

http_request_impl
Executes an HTTP request using ureq. Called from capability-gated context.
register_http_deny_stub
Registers orcs.http as a deny-by-default stub.