Optional ReadonlybodyOptional ReadonlydecodeOptional ReadonlyflattenWhether to flatten functype ADTs in the request body to their primitive
projections (Option → nullable, Either → right-value-or-throw-on-Left,
List → array, Try → success-value-or-throw, Map → record) before serializing.
Default true — matches the wire shape external JSON APIs expect.
Set to false to emit each ADT's canonical {_tag, value} form via
toValue() for functype-to-functype services where both ends round-trip
the tagged shape via Decoder.tagged.*.
Optional ReadonlyheadersReadonlymethodOptional ReadonlyparamsQuery-string parameters appended to the URL. Merges with any query string
already present in url. See HttpQueryParams for encoding rules.
Optional ReadonlyparseOptional ReadonlysignalReadonlyurlOptional Readonlyvalidate
Either-returning response decoder. Returns
Left(DecoderError)on failure; the framework maps that toHttpError.DecodeError(cause: DecoderError). The recursiveDecoderErrortree preserves structural failure info (paths, child errors) for diagnosis and rendering.For adapters whose primary API throws (e.g. Zod's
.parse), use an adapter package (e.g.functype-zod'sDecoder.fromZod(schema)) or wrap the throwing function in a tiny custom decoder. The deprecatedvalidatefield is also still accepted for back-compat.