TianoCore EDK2 master
Loading...
Searching...
No Matches
RedfishHttpOperation.h File Reference
#include "RedfishHttpDxe.h"

Go to the source code of this file.

Macros

#define REDFISH_CONTENT_LENGTH_SIZE   80
 
#define REDFISH_COMMON_HEADER_SIZE   5
 
#define REDFISH_HTTP_HEADER_ODATA_VERSION_STR   "OData-Version"
 
#define REDFISH_HTTP_HEADER_ODATA_VERSION_VALUE   "4.0"
 
#define REDFISH_HTTP_HEADER_USER_AGENT_VALUE   "edk2redfish"
 
#define REDFISH_HTTP_HEADER_CONNECTION_STR   "Connection"
 
#define REDFISH_HTTP_HEADER_CONNECTION_VALUE   "Keep-Alive"
 
#define REDFISH_HTTP_CONTENT_ENCODING_NONE   "None"
 
#define ASCII_STR_DUPLICATE(a)   (AllocateCopyPool (AsciiStrSize ((a)), (a)))
 

Functions

EFI_STATUS ReleaseRedfishRequest (IN REDFISH_REQUEST *Request)
 
EFI_STATUS ReleaseRedfishResponse (IN REDFISH_RESPONSE *Response)
 
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)
 

Detailed Description

Definitions of RedfishHttpOperation

Copyright (c) 2024, NVIDIA CORPORATION & AFFILIATES. All rights reserved.

SPDX-License-Identifier: BSD-2-Clause-Patent

Definition in file RedfishHttpOperation.h.

Macro Definition Documentation

◆ ASCII_STR_DUPLICATE

#define ASCII_STR_DUPLICATE (   a)    (AllocateCopyPool (AsciiStrSize ((a)), (a)))

Definition at line 23 of file RedfishHttpOperation.h.

◆ REDFISH_COMMON_HEADER_SIZE

#define REDFISH_COMMON_HEADER_SIZE   5

Definition at line 16 of file RedfishHttpOperation.h.

◆ REDFISH_CONTENT_LENGTH_SIZE

#define REDFISH_CONTENT_LENGTH_SIZE   80

Definition at line 15 of file RedfishHttpOperation.h.

◆ REDFISH_HTTP_CONTENT_ENCODING_NONE

#define REDFISH_HTTP_CONTENT_ENCODING_NONE   "None"

Definition at line 22 of file RedfishHttpOperation.h.

◆ REDFISH_HTTP_HEADER_CONNECTION_STR

#define REDFISH_HTTP_HEADER_CONNECTION_STR   "Connection"

Definition at line 20 of file RedfishHttpOperation.h.

◆ REDFISH_HTTP_HEADER_CONNECTION_VALUE

#define REDFISH_HTTP_HEADER_CONNECTION_VALUE   "Keep-Alive"

Definition at line 21 of file RedfishHttpOperation.h.

◆ REDFISH_HTTP_HEADER_ODATA_VERSION_STR

#define REDFISH_HTTP_HEADER_ODATA_VERSION_STR   "OData-Version"

Definition at line 17 of file RedfishHttpOperation.h.

◆ REDFISH_HTTP_HEADER_ODATA_VERSION_VALUE

#define REDFISH_HTTP_HEADER_ODATA_VERSION_VALUE   "4.0"

Definition at line 18 of file RedfishHttpOperation.h.

◆ REDFISH_HTTP_HEADER_USER_AGENT_VALUE

#define REDFISH_HTTP_HEADER_USER_AGENT_VALUE   "edk2redfish"

Definition at line 19 of file RedfishHttpOperation.h.

Function Documentation

◆ HttpSendReceive()

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.

Parameters
[in]ServicePointer to Redfish service.
[in]UriUri of Redfish service.
[in]MethodHTTP method.
[in]RequestRequest data. This is optional.
[out]ResponseRedfish response data.
Return values
EFI_SUCCESSRequest is sent and received successfully.
OthersErrors occur.

Definition at line 624 of file RedfishHttpOperation.c.

◆ ReleaseRedfishRequest()

EFI_STATUS ReleaseRedfishRequest ( IN REDFISH_REQUEST Request)

This function free resources in Request. Request is no longer available after this function returns successfully.

Parameters
[in]RequestHTTP request to be released.
Return values
EFI_SUCCESSResource is released successfully.
OthersErrors occur.

Definition at line 73 of file RedfishHttpOperation.c.

◆ ReleaseRedfishResponse()

EFI_STATUS ReleaseRedfishResponse ( IN REDFISH_RESPONSE Response)

This function free resources in given Response.

Parameters
[in]ResponseHTTP response to be released.
Return values
EFI_SUCCESSResource is released successfully.
OthersErrors occur.

Definition at line 112 of file RedfishHttpOperation.c.