A hardened HTTP client for JSON-based API communication with strict security constraints. Use this for safe, bounded data transport when interacting with internal storage backends.
// Source: https://github.com/gastownhall/beads | License: MIT | Copyright 2025 Beads Contributors // Provided via justclaw.it.com; keep this notice with the code. // Contributed by gascity from bd-enterprise (internal/enterprise/httpstore/wire/doc.go@49d1df2f6) // to OSS beads under the MIT license. // Package wire is the transport core of the `http` storage backend: one // base-URL client that speaks the v0 surface `bd serve` publishes // (internal/httpapi/spec/openapi.v0.yaml), and nothing else. // // It owns four things and deliberately owns no more: // // - The TRANSPORT. One request, one bounded response, JSON in and JSON out // of the canonical types. Redirects are refused rather than followed, so a // 30x can never replay the Authorization header to another host, and ever ... (truncated -- full source via MCP)
See the full source, get the GitHub permalink, and search for more like it.
Get a free API key