HCHttpCallRequestSetRequestBodyReadFunction

Sets a custom callback function that will be used to read the request body when the HTTP call is performed. If a custom read callback is used, any request body data previously set by HCHttpCallRequestSetRequestBodyBytes or HCHttpCallRequestSetRequestBodyString is ignored making these API operations mutually exclusive.

Syntax

HRESULT HCHttpCallRequestSetRequestBodyReadFunction(  
         HCCallHandle call,  
         HCHttpCallRequestBodyReadFunction readFunction,  
         size_t bodySize,  
         void* context  
)  

Parameters

call   _In_
Type: HCCallHandle

The handle of the HTTP call.

readFunction   _In_
Type: HCHttpCallRequestBodyReadFunction

The request body read function this call should use.

bodySize   _In_
Type: size_t

The size of the body.

context   _In_opt_
Type: void*

The context associated with this read function.

Return value

Type: HRESULT

Result code of this API operation. Possible values are S_OK or E_INVALIDARG.

Remarks

This must be called prior to calling HCHttpCallPerformAsync.

Requirements

Header: httpClient.h

Library: libHttpClient.141.GSDK.C.lib

See also

httpClient