Skip to content

Phase 1: Core HTTP Domain Model #2

Description

@Wahbeh-Mohammad

Implement the immutable HTTP domain model in @dexpace/core: Request, Response, Headers, Status,
MediaType, Protocol, QueryParams, RequestOptions, ETag, HttpRange, RequestConditions.

Scope

  • Builder-based models: #private fields, private constructor, defensive-copying newBuilder(),
    validate-then-construct build(), Object.freeze(this) once at construction (nested collections frozen
    independently).
  • Value types with no builder (Status, MediaType, Protocol) as frozen classes with static factories.
  • Typed Error subclasses only; shared requireField() validation helper.
  • Header strictness (HTTP-18 splitting defense), URL/query encoding, conditional-request application.
  • SPDX header convention (NFR-13) starts here and holds for every later phase.

Spec refs

Product spec §4 (HTTP-3HTTP-53), SEAM-29. sdk-design: §4.

Dependencies

Phase 0.

Docs

  • Plan: docs/superpowers/plans/2026-07-23-phase1-core-http-domain-model.md
  • Design: docs/superpowers/specs/2026-07-23-phase1-core-http-domain-model-design.md
  • Checklist: docs/superpowers/plans/2026-07-23-phase1-core-http-domain-model-checklist.md

Notes

Request/Response body types ship as unknown placeholders here and are narrowed in Phase 3b; MultipartBody
also lands in 3b. Zero runtime dependencies (SEAM-1).

Metadata

Metadata

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions