Request Adapter¶
request_adapter
¶
Protocol for translating transport-level requests into application input.
RequestAdapter
¶
Bases: Protocol
Translates a raw transport request into application-layer input.
Implementations handle transport-specific deserialization (e.g.
parsing JSON bodies, extracting headers, normalising query
parameters) and produce a typed use-case input DTO or command.
Source code in src/forging_blocks/presentation/request_adapter.py
adapt(raw: RawRequest) -> UseCaseInput
¶
Convert raw transport data into use-case input.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
raw
|
RawRequest
|
The transport-level request (e.g. an HTTP request |
required |
Returns:
| Type | Description |
|---|---|
UseCaseInput
|
A typed input value suitable for passing to a |
UseCaseInput
|
|