Skip to content

GetResults

GetResults<T> retrieves the full response envelope for a GET call and returns just its Results array, giving callers a typed collection without exposing the envelope's server/status/version metadata.

Field Value
Operation ID OP-02
Trigger Direct call by a consuming application.
Inputs methodUriSegment.
Outputs T[].
Primary components JsonHttpClient.GetResults<T>(string)
Entry point src/SAIF.Web.API.Clients/JsonHttpClient.cs

Steps

  1. Call the private GetResultsFromApiResponse<T>(url) wrapper.
  2. Obtain the full response envelope.
  3. Embedded logic (BR-CLI-001–BR-CLI-006, BR-CLI-010–BR-CLI-012, BR-CLI-014):
    • Execute the HTTP GET through the shared funnel and project the transport response into ApiResponse<T>.

Origin: This step is implemented in GetResponse\<T> (SAIF.Web.API.Clients) and executed on behalf of this operation. - On failure: exceptions from the delegate propagate uncaught. 3. Return apiResponse.Results (BR-CLI-012). - The result may be an empty array, or null if GetContentArray<T> returned null for a JSON null array.

Process flow

flowchart TD
    Start(["GetResults&lt;T&gt;<br>called"]) --> Response["GetResponse&lt;T&gt;:<br>full envelope"]
    Response --> Extract["Return<br>apiResponse.Results"]
    Extract --> EndOk([Return T array])

Failure and edge-case behavior

  • The returned array may be empty (no matching results) or null (JSON null array from the API) — callers should handle both.

Sources

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