Share via


HCHttpCallRequestSetRequestBodyBytes

Set the request body bytes of the HTTP call. This API operation is mutually exclusive with HCHttpCallRequestSetRequestBodyReadFunction and will result in any custom read callbacks that were previously set on this call handle to be ignored.

Syntax

HRESULT HCHttpCallRequestSetRequestBodyBytes(  
         HCCallHandle call,  
         const uint8_t* requestBodyBytes,  
         uint32_t requestBodySize  
)  

Parameters

call   _In_
Type: HCCallHandle

The handle of the HTTP call.

requestBodyBytes   _In_reads_bytes_(requestBodySize)
Type: uint8_t*

The request body bytes of the HTTP call.

requestBodySize   _In_
Type: uint32_t

The length in bytes of the body being set.

Return value

Type: HRESULT

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

Remarks

This must be called prior to calling HCHttpCallPerformAsync.

Requirements

Header: httpClient.h

Library: libHttpClient.GDK.lib

See also

httpClient