HCHttpCallResponseGetResponseString

Get the response body string of the HTTP call. This API operation will fail if a custom write callback was set on this call handle using HCHttpCallResponseSetResponseBodyWriteFunction.

Syntax

HRESULT HCHttpCallResponseGetResponseString(  
         HCCallHandle call,  
         const char** responseString  
)  

Parameters

call   _In_
Type: HCCallHandle

The handle of the HTTP call.

responseString   _Out_
Type: char**

The UTF-8 encoded response body string of 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.

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