Problem
There's no clean raw-vs-parsed response seam; header/status access always sits in front of (or forces) deserialization.
Proposed change
Add a fun interface ResponseHandler<T> plus ParsedResponse<T> (or Response.parseable { }) with by lazy parse-once memoization. Ship dep-free String/Empty handlers in core; the JSON handler (jsonHandler(serde, Class<T>)) lives in the adapter. Document that parse() consumes/closes the body, so raw headers must be read first. This is the seam generated services dispatch against.
Acceptance
Dependencies
Priority: medium · Effort: small
Problem
There's no clean raw-vs-parsed response seam; header/status access always sits in front of (or forces) deserialization.
Proposed change
Add a
fun interface ResponseHandler<T>plusParsedResponse<T>(orResponse.parseable { }) withby lazyparse-once memoization. Ship dep-free String/Empty handlers in core; the JSON handler (jsonHandler(serde, Class<T>)) lives in the adapter. Document thatparse()consumes/closes the body, so raw headers must be read first. This is the seam generated services dispatch against.Acceptance
Dependencies
Priority: medium · Effort: small