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

# HCSetHttpCallPerformFunction

> HCSetHttpCallPerformFunction

Optionally allows the caller to implement the HTTP perform function.

## Syntax

```cpp theme={null}
HRESULT HCSetHttpCallPerformFunction(  
         HCCallPerformFunction performFunc,  
         void* performContext  
)  
```

### Parameters

*performFunc*   \_In\_\
Type: [HCCallPerformFunction](https://docs.xbox.com/reference/live/httpclient/httpprovider/functions/hccallperformfunction.md)

A callback that implements HTTP perform function as desired.

*performContext*   \_In\_opt\_\
Type: void\*

The context for the callback.

### Return value

Type: HRESULT

Returns `S_OK` on success, `E_INVALIDARG` if *performFunc* is `nullptr`, or `E_HC_ALREADY_INITIALISED` if libHttpClient is already initialized.

## Remarks

Call this function before [HCInitialize](https://docs.xbox.com/reference/live/httpclient/httpclient/functions/hcinitialize.md). In the [HCCallPerformFunction](https://docs.xbox.com/reference/live/httpclient/httpprovider/functions/hccallperformfunction.md) callback, use the HCHttpCallRequestGet\*() functions to get information about the HTTP call, perform the call as desired, and set the response with HCHttpCallResponseSet\*().

## Requirements

**Header:** httpProvider.h

**Library:** libHttpClient.lib

**Supported platforms:** Windows, XBOX One family consoles and XBOX Series consoles

## See also

[httpProvider](https://docs.xbox.com/reference/live/httpclient/httpprovider/httpprovider_members.md)


## Related topics

- [HCGetHttpCallPerformFunction](https://docs.xbox.com/reference/live/httpclient/httpprovider/functions/hcgethttpcallperformfunction.md)
- [HCCallPerformFunction](https://docs.xbox.com/reference/live/httpclient/httpprovider/functions/hccallperformfunction.md)
- [HCHttpCallRequestGetMaxReceiveBufferSize](https://docs.xbox.com/reference/live/httpclient/httpclient/functions/hchttpcallrequestgetmaxreceivebuffersize.md)
- [httpProvider (contents)](https://docs.xbox.com/reference/live/httpclient/httpprovider/httpprovider_members.md)
- [HCSettingsSetGlobalRequestLimit](https://docs.xbox.com/reference/live/httpclient/httpclient/functions/hcsettingssetglobalrequestlimit.md)
