TianoCore EDK2 master
|
Go to the source code of this file.
Functions | |
EFI_STATUS | CopyHttpHeaders (IN EFI_HTTP_HEADER *SrcHeaders, IN UINTN SrcHeaderCount, OUT EFI_HTTP_HEADER **DstHeaders, OUT UINTN *DstHeaderCount) |
EFI_STATUS | ReleaseRedfishRequest (IN REDFISH_REQUEST *Request) |
EFI_STATUS | ReleaseRedfishResponse (IN REDFISH_RESPONSE *Response) |
EFI_STATUS | ReleaseHttpMessage (IN EFI_HTTP_MESSAGE *HttpMessage, IN BOOLEAN IsRequest) |
EFI_HTTP_MESSAGE * | BuildRequestMessage (IN REDFISH_SERVICE_PRIVATE *ServicePrivate, IN EFI_STRING Uri, IN EFI_HTTP_METHOD Method, IN REDFISH_REQUEST *Request OPTIONAL, IN CHAR8 *ContentEncoding OPTIONAL) |
EFI_STATUS | ParseResponseMessage (IN REDFISH_SERVICE_PRIVATE *ServicePrivate, IN EFI_HTTP_MESSAGE *ResponseMsg, OUT REDFISH_RESPONSE *RedfishResponse) |
EFI_STATUS | HttpSendReceive (IN REDFISH_SERVICE Service, IN EFI_STRING Uri, IN EFI_HTTP_METHOD Method, IN REDFISH_REQUEST *Request OPTIONAL, OUT REDFISH_RESPONSE *Response) |
RedfishHttpOperation handles HTTP operations.
Copyright (c) 2024, NVIDIA CORPORATION & AFFILIATES. All rights reserved.
SPDX-License-Identifier: BSD-2-Clause-Patent
Definition in file RedfishHttpOperation.c.
EFI_HTTP_MESSAGE * BuildRequestMessage | ( | IN REDFISH_SERVICE_PRIVATE * | ServicePrivate, |
IN EFI_STRING | Uri, | ||
IN EFI_HTTP_METHOD | Method, | ||
IN REDFISH_REQUEST *Request | OPTIONAL, | ||
IN CHAR8 *ContentEncoding | OPTIONAL | ||
) |
This function build Redfish message for sending data to Redfish service. It's call responsibility to properly release returned HTTP message by calling ReleaseHttpMessage.
[in] | ServicePrivate | Pointer to Redfish service private data. |
[in] | Uri | Redfish service URI. |
[in] | Method | HTTP method. |
[in] | Request | Additional data to send to Redfish service. This is optional. |
[in] | ContentEncoding | Content encoding method to compress HTTP context. This is optional. When ContentEncoding is NULL, No compress method will be performed. |
EFI_HTTP_MESSAGE | * Pointer to newly created HTTP message. |
NULL | Error occurred. |
Definition at line 209 of file RedfishHttpOperation.c.
EFI_STATUS CopyHttpHeaders | ( | IN EFI_HTTP_HEADER * | SrcHeaders, |
IN UINTN | SrcHeaderCount, | ||
OUT EFI_HTTP_HEADER ** | DstHeaders, | ||
OUT UINTN * | DstHeaderCount | ||
) |
This function copies all headers in SrcHeaders to DstHeaders. It's call responsibility to release returned DstHeaders.
[in] | SrcHeaders | Source headers. |
[in] | SrcHeaderCount | Number of header in source headers. |
[out] | DstHeaders | Destination headers. |
[out] | DstHeaderCount | Number of header in designation headers. |
EFI_SUCCESS | Headers are copied successfully. |
Others | Errors occur. |
Definition at line 27 of file RedfishHttpOperation.c.
EFI_STATUS HttpSendReceive | ( | IN REDFISH_SERVICE | Service, |
IN EFI_STRING | Uri, | ||
IN EFI_HTTP_METHOD | Method, | ||
IN REDFISH_REQUEST *Request | OPTIONAL, | ||
OUT REDFISH_RESPONSE * | Response | ||
) |
This function send Redfish request to Redfish service by calling Rest Ex protocol.
[in] | Service | Pointer to Redfish service. |
[in] | Uri | Uri of Redfish service. |
[in] | Method | HTTP method. |
[in] | Request | Request data. This is optional. |
[out] | Response | Redfish response data. |
EFI_SUCCESS | Request is sent and received successfully. |
Others | Errors occur. |
Definition at line 624 of file RedfishHttpOperation.c.
EFI_STATUS ParseResponseMessage | ( | IN REDFISH_SERVICE_PRIVATE * | ServicePrivate, |
IN EFI_HTTP_MESSAGE * | ResponseMsg, | ||
OUT REDFISH_RESPONSE * | RedfishResponse | ||
) |
This function parse response message from Redfish service, and build Redfish response for caller. It's call responsibility to properly release Redfish response by calling ReleaseRedfishResponse.
[in] | ServicePrivate | Pointer to Redfish service private data. |
[in] | ResponseMsg | Response message from Redfish service. |
[out] | RedfishResponse | Redfish response data. |
EFI_SUCCESS | Redfish response is returned successfully. |
Others | Errors occur. |
Definition at line 487 of file RedfishHttpOperation.c.
EFI_STATUS ReleaseHttpMessage | ( | IN EFI_HTTP_MESSAGE * | HttpMessage, |
IN BOOLEAN | IsRequest | ||
) |
This function free resources in given HTTP message.
[in] | HttpMessage | HTTP message to be released. |
[in] | IsRequest | TRUE if this is request type of HTTP message. FALSE if this is response type of HTTP message. |
EFI_SUCCESS | Resource is released successfully. |
Others | Errors occur. |
Definition at line 151 of file RedfishHttpOperation.c.
EFI_STATUS ReleaseRedfishRequest | ( | IN REDFISH_REQUEST * | Request | ) |
This function free resources in Request. Request is no longer available after this function returns successfully.
[in] | Request | HTTP request to be released. |
EFI_SUCCESS | Resource is released successfully. |
Others | Errors occur. |
Definition at line 73 of file RedfishHttpOperation.c.
EFI_STATUS ReleaseRedfishResponse | ( | IN REDFISH_RESPONSE * | Response | ) |
This function free resources in given Response.
[in] | Response | HTTP response to be released. |
EFI_SUCCESS | Resource is released successfully. |
Others | Errors occur. |
Definition at line 112 of file RedfishHttpOperation.c.