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¶
- Call the private
GetResultsFromApiResponse<T>(url)wrapper. - Obtain the full response envelope.
- 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>.
- Execute the HTTP GET through the shared funnel and project the transport response into
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. ReturnapiResponse.Results(BR-CLI-012). - The result may be an empty array, ornullifGetContentArray<T>returnednullfor a JSONnullarray.
Process flow¶
flowchart TD
Start(["GetResults<T><br>called"]) --> Response["GetResponse<T>:<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(JSONnullarray from the API) — callers should handle both.
Related documentation¶
Sources¶
src/SAIF.Web.API.Clients/JsonHttpClient.cs