GetResponse¶
GetResponse<T> is the GET-verb entry point that returns the complete ApiResponse<T> envelope — results, responding server, status code, and version — rather than only the materialized results.
| Field | Value |
|---|---|
| Operation ID | OP-03 |
| Trigger | Direct call by a consuming application, or GetResults\<T> step 2. |
| Inputs | methodUriSegment. |
| Outputs | ApiResponse<T>. |
| Primary components | JsonHttpClient.GetResponse<T>(string) |
| Entry point | src/SAIF.Web.API.Clients/JsonHttpClient.cs |
Steps¶
- Execute the HTTP GET through the shared request funnel.
- Embedded logic (BR-CLI-001, BR-CLI-002, BR-CLI-003, BR-CLI-005, BR-CLI-006, BR-CLI-010):
- Build the client, add headers, execute, retry, and enforce success.
Origin: This step is implemented in GetJsonResponse (
SAIF.Web.API.Clients) and executed on behalf of this operation. - On failure: a typedSAIFExceptionis thrown whenEnsureSuccessfulResponseis enabled. 2. Project the transport response into theApiResponse<T>envelope (BR-CLI-009, BR-CLI-012, BR-CLI-014). - Embedded logic: - Normalize the JSON payload intoT[], capture theServer-Nameheader, copy the status code, and copy the (always-null) version value.Origin: This step is implemented in GetApiResponse\<T> (
SAIF.Web.API.Clients) and executed on behalf of this operation.
Process flow¶
flowchart TD
Start(["GetResponse<T><br>called"]) --> Funnel["Execute GET via<br>GetJsonResponse"]
Funnel --> Project["GetApiResponse<T>:<br>project into envelope"]
Project --> EndOk(["Return<br>ApiResponse<T>"])
Failure and edge-case behavior¶
ApiResponse<T>.Versionis alwaysnull, because the transport-levelJsonResponse.Versionis never assigned upstream.
Related documentation¶
Sources¶
src/SAIF.Web.API.Clients/JsonHttpClient.cs