Skip to content

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

  1. Execute the HTTP GET through the shared request funnel.
  2. 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 typed SAIFException is thrown when EnsureSuccessfulResponse is enabled. 2. Project the transport response into the ApiResponse<T> envelope (BR-CLI-009, BR-CLI-012, BR-CLI-014). - Embedded logic: - Normalize the JSON payload into T[], capture the Server-Name header, 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&lt;T&gt;<br>called"]) --> Funnel["Execute GET via<br>GetJsonResponse"]
    Funnel --> Project["GetApiResponse&lt;T&gt;:<br>project into envelope"]
    Project --> EndOk(["Return<br>ApiResponse&lt;T&gt;"])

Failure and edge-case behavior

  • ApiResponse<T>.Version is always null, because the transport-level JsonResponse.Version is never assigned upstream.

Sources

  • src/SAIF.Web.API.Clients/JsonHttpClient.cs