Expand description
Native http module for making HTTP requests.
Exports: http.get, http.delete (Stage C); http.post_text, http.post_bytes, http.put_text, http.put_bytes (Stage D).
All functions are async. Uses reqwest under the hood. Policy gated: requires NetConnect permission.
Stage C HashMap-marshal P1(b) migration (2026-05-07):
- Outer response shape
{status, headers, body, ok}returns viaTypedReturn::OkObjectPairs(Cluster #4 β shape, mirrorsarrow.metadataprecedent atarrow_module.rs:127). - Inner
headersfield carriesHashMap<string, string>payload viaConcreteReturn::HashMapStringString(insertion-order preserved). - Options arg parsing uses
Vec<(Arc<String>, Arc<HeapValue>)>FromSlot impl from Step 1 P1(b) infrastructure (crates/shape-runtime/src/marshal.rs, Stage C commit36519f6).
Stage D N4 partial sign-off (2026-05-07; supervisor relay):
http.post/http.putlegacy shape (single fn withbody: any) replaced by typed overloads via Shape API split (stdlib-src/core/http.shape):post_text(url, body: string, options)— setsContent-Type: text/plain; charset=utf-8post_bytes(url, body: Array<int>, options)— setsContent-Type: application/octet-streamput_text(url, body: string, options)— same content-type as post_textput_bytes(url, body: Array<int>, options)— same as post_bytes
- Body types map directly to existing
FromSlotimpls (Arc<String>atmarshal.rs:129,Vec<u8>atmarshal.rs:330) per supervisor’s “mechanical typed marshal” framing. http.post_json(url, body: object, options)andhttp.put_jsonremain DEFERRED pending architectural sub-decision N7 — HeapValue→JSON serializer for HTTP / object-output marshal contexts. Thebody: objectshape requires walking the polymorphicVec<(Arc<String>, Arc<HeapValue>)>tree and producing a JSON string; per-variant serialization choices for Decimal, DataTable, Content, Temporal, TableView each represent a user-visible behavioral commitment that needs supervisor sign-off (architectural-adjacent helper, refused as bundled with Step 2 per the “no bundling architectural decisions” watchlist refusal). Surfaced via team-lead’s relay batch.
Tests deleted along with the legacy ValueWord-based fixtures, mirroring
the csv_module migration (commit 9f6b1d3). New typed-marshal test
harness arrives with the shape-vm cleanup workstream.
Functions§
- create_
http_ module - Create the
httpmodule with async HTTP request functions.