HCHttpCallRequestSetHeader

Set a request header for the HTTP call.

Syntax

HRESULT HCHttpCallRequestSetHeader(  
         HCCallHandle call,  
         const char* headerName,  
         const char* headerValue,  
         bool allowTracing  
)  

Parameters

call   _In_
Type: HCCallHandle

The handle of the HTTP call.

headerName   _In_z_
Type: char*

UTF-8 encoded request header name for the HTTP call.

headerValue   _In_z_
Type: char*

UTF-8 encoded request header value for the HTTP call.

allowTracing   _In_
Type: bool

Set to false to skip tracing this request header, for example if it contains private information.

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.141.GSDK.C.lib

See also

httpClient