> ## 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.

# HCSetHttpCallPerformFunction

> HCSetHttpCallPerformFunction

# HCSetHttpCallPerformFunction

選擇性地允許呼叫端實作 HTTP 執行函式。

## 語法

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

### 參數

*performFunc*   \_In\_\
類型：HCCallPerformFunction

依需求實作 HTTP 執行函式的回呼。

*performContext*   \_In\_opt\_\
類型：void\*

回呼的內容。

### 傳回值

類型：HRESULT

此 API 作業的結果代碼。可能的值為 S\_OK 或 E\_HC\_ALREADY\_INITIALISED。

## 備註

必須在 HCInit 之前呼叫。在 HCCallPerformFunction 回呼中，使用 HCHttpCallRequestGet\*() 和 HCSettingsGet\*() 取得 HTTP 呼叫的相關資訊，依需求執行呼叫，並使用 HCHttpCallResponseSet\*() 設定回應。

## 需求

**標頭：** httpProvider.h

**程式庫：** libHttpClient.GDK.lib

## 另請參閱

[httpProvider](/zh-TW/reference/live/httpclient/httpprovider/httpprovider_members)


## Related topics

- [HCGetHttpCallPerformFunction](/zh-TW/reference/live/httpclient/httpprovider/functions/hcgethttpcallperformfunction.md)
- [HCHttpCallRequestSetRequestBodyReadFunction](/zh-TW/reference/live/httpclient/httpclient/functions/hchttpcallrequestsetrequestbodyreadfunction.md)
- [HCHttpCallResponseSetResponseBodyWriteFunction](/zh-TW/reference/live/httpclient/httpclient/functions/hchttpcallresponsesetresponsebodywritefunction.md)
- [HCHttpCallPerformAsync](/zh-TW/reference/live/httpclient/httpclient/functions/hchttpcallperformasync.md)
- [XblHttpCallPerformAsync](/zh-TW/reference/live/xsapi-c/http_call_c/functions/xblhttpcallperformasync.md)
