Skip to content

Commit

Permalink
RedfishPkg/RedfishLib: return HTTP headers to caller
Browse files Browse the repository at this point in the history
Call Ex interface to get HTTP headers and return to caller.

Signed-off-by: Nickle Wang <nicklew@nvidia.com>
Cc: Abner Chang <abner.chang@amd.com>
Cc: Igor Kulchytskyy <igork@ami.com>
Cc: Nick Ramirez <nramirez@nvidia.com>
Reviewed-by: Abner Chang <abner.chang@amd.com>
  • Loading branch information
nicklela authored and mergify[bot] committed Oct 26, 2023
1 parent 1cbdd6e commit 8765f3e
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions RedfishPkg/PrivateLibrary/RedfishLib/RedfishLib.c
Original file line number Diff line number Diff line change
Expand Up @@ -356,7 +356,7 @@ RedfishGetByUri (

ZeroMem (RedResponse, sizeof (REDFISH_RESPONSE));

JsonValue = getUriFromService (RedfishService, Uri, &RedResponse->StatusCode);
JsonValue = getUriFromServiceEx (RedfishService, Uri, &RedResponse->Headers, &RedResponse->HeaderCount, &RedResponse->StatusCode);
RedResponse->Payload = createRedfishPayload (JsonValue, RedfishService);

//
Expand Down Expand Up @@ -498,10 +498,12 @@ RedfishPatchToUri (

ZeroMem (RedResponse, sizeof (REDFISH_RESPONSE));

JsonValue = (EDKII_JSON_VALUE)patchUriFromService (
JsonValue = (EDKII_JSON_VALUE)patchUriFromServiceEx (
RedfishService,
Uri,
Content,
&(RedResponse->Headers),
&(RedResponse->HeaderCount),
&(RedResponse->StatusCode)
);

Expand Down Expand Up @@ -661,12 +663,14 @@ RedfishPostToUri (

ZeroMem (RedResponse, sizeof (REDFISH_RESPONSE));

JsonValue = (EDKII_JSON_VALUE)postUriFromService (
JsonValue = (EDKII_JSON_VALUE)postUriFromServiceEx (
RedfishService,
Uri,
Content,
ContentSize,
ContentType,
&(RedResponse->Headers),
&(RedResponse->HeaderCount),
&(RedResponse->StatusCode)
);

Expand Down

0 comments on commit 8765f3e

Please sign in to comment.