Skip to content

feat(net): HTTP contract — HttpError, HttpClient, ResponseBody + net-http-mock (Slice 0 PR 2) #59

Description

@NotAProfDev

Summary

PR 2 of Slice 0 (the net-http foundation) — give oath-adapter-net-http-api its HTTP data-plane contracts and ship the standalone oath-adapter-net-http-mock test harness.

Plan: docs/superpowers/plans/2026-07-01-net-http-contract.md. Builds on PR 1 (#57).

Scope

  • HttpError — one concrete transport/middleware error (model A: HTTP 4xx/5xx statuses are NOT error-ified; they pass through as Ok(Response) body-intact) + HasErrorKind.
  • HttpClient — blanket-impl'd Service sub-trait with send sugar.
  • ResponseBody<B> — buffer-xor-stream pin-project-lite enum forwarding all three Body methods; BufferMode.
  • oath-adapter-net-http-mock — standalone harness: MockClient, MockBody, MockTimer (controllable virtual clock).

Out of scope

AuthSource/Auth/Guarded (PR 3), RateKey/coverage (PR 4), the resilience layers + stack/build + hyper leaf (later slices), the CircuitOpen error variant (lands with the CircuitBreaker layer).

Governing decisions

Construction-surface spec (docs/superpowers/specs/2026-06-30-net-http-construction-surface-design.md), ADR-0030, foundation plan PR 2.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions