> ## Documentation Index
> Fetch the complete documentation index at: https://devdocs.xbox.com/llms.txt
> Use this file to discover all available pages before exploring further.

# HCHttpCallResponseSetHeaderWithLength

> HCHttpCallResponseSetHeaderWithLength

# HCHttpCallResponseSetHeaderWithLength

Set a response header for the HTTP call.

## Syntax

```cpp theme={null}
HRESULT HCHttpCallResponseSetHeaderWithLength(  
         HCCallHandle call,  
         const char* headerName,  
         size_t nameSize,  
         const char* headerValue,  
         size_t valueSize  
)  
```

### Parameters

*call*   \_In\_\
Type: HCCallHandle

The handle of the HTTP call.

*headerName*   \_In\_reads\_(nameSize)\
Type: char\*

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

*nameSize*   \_In\_\
Type: size\_t

The length in bytes of the header name string.

*headerValue*   \_In\_reads\_(valueSize)\
Type: char\*

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

*valueSize*   \_In\_\
Type: size\_t

The length in bytes of the header value string.

### Return value

Type: HRESULT

Result code for this API operation. Possible values are S\_OK, E\_INVALIDARG, E\_OUTOFMEMORY, or E\_FAIL.

## Requirements

**Header:** httpProvider.h

**Library:** libHttpClient.GDK.lib

## See also

[httpProvider](/reference/live/httpclient/httpprovider/httpprovider_members)


## Related topics

- [HCHttpCallResponseSetHeader](/reference/live/httpclient/httpprovider/functions/hchttpcallresponsesetheader.md)
- [HCHttpCallResponseSetResponseBodyBytes](/reference/live/httpclient/httpprovider/functions/hchttpcallresponsesetresponsebodybytes.md)
- [HCHttpCallResponseSetResponseBodyWriteFunction](/reference/live/httpclient/httpclient/functions/hchttpcallresponsesetresponsebodywritefunction.md)
- [HCHttpCallResponseSetGzipCompressed](/reference/live/httpclient/httpclient/functions/hchttpcallresponsesetgzipcompressed.md)
- [HCHttpCallResponseSetStatusCode](/reference/live/httpclient/httpprovider/functions/hchttpcallresponsesetstatuscode.md)
