HCHttpCallResponseGetHeader

Get a response header for the HTTP call for a given header name.

Syntax

HRESULT HCHttpCallResponseGetHeader(  
         HCCallHandle call,  
         const char* headerName,  
         const char** headerValue  
)  

Parameters

call   _In_
Type: HCCallHandle

The handle of the HTTP call.

headerName   _In_z_
Type: char*

UTF-8 encoded response header name for the HTTP call. The memory for the returned string pointer remains valid for the life of the HCCallHandle object until HCHttpCallCloseHandle() is called on it.

headerValue   _Out_
Type: char**

UTF-8 encoded response header value for the HTTP call. Returns nullptr if the header doesn't exist. The memory for the returned string pointer remains valid for the life of the HCCallHandle object until HCHttpCallCloseHandle() is called on it.

Return value

Type: HRESULT

Result code for this API operation. Possible values are S_OK, E_INVALIDARG, or E_FAIL.

Remarks

This can only be called after calling HCHttpCallPerformAsync when the HTTP task is completed.

Requirements

Header: httpClient.h

Library: libHttpClient.141.GSDK.C.lib

See also

httpClient