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

# XblHttpCallRequestSetRetryCacheId

> XblHttpCallRequestSetRetryCacheId

# XblHttpCallRequestSetRetryCacheId

此 REST 终结点的 ID 号，用于缓存 Retry-After 标头以实现快速失败。

## 语法

```cpp theme={null}
HRESULT XblHttpCallRequestSetRetryCacheId(  
         XblHttpCallHandle call,  
         uint32_t retryAfterCacheId  
)  
```

### 参数

*call*   \_In\_\
类型：[XblHttpCallHandle](https://docs.xbox.com/zh-CN/reference/live/xsapi-c/http_call_c/handles/xblhttpcallhandle.md)

HTTP 调用的句柄。传入 nullptr 可设置将来调用的默认值。

*retryAfterCacheId*   \_In\_\
类型：uint32\_t

此 REST 终结点的 ID 号，用于缓存 Retry-After 标头以实现快速失败。1-1000 已保留给 XSAPI 使用。

### 返回值

类型：HRESULT

此 API 操作的结果代码。可能的值为 S\_OK、E\_INVALIDARG 或 E\_FAIL。

## 备注

必须在调用 [XblHttpCallPerformAsync](https://docs.xbox.com/zh-CN/reference/live/xsapi-c/http_call_c/functions/xblhttpcallperformasync.md) 之前调用此函数。

## 要求

**头文件：** http\_call\_c.h

**库：** Microsoft.Xbox.Services.14x.GDK.C.lib

## 另请参阅

[http\_call\_c](https://docs.xbox.com/zh-CN/reference/live/xsapi-c/http_call_c/http_call_c_members.md)


## Related topics

- [http_call_c](https://docs.xbox.com/zh-CN/reference/live/xsapi-c/http_call_c/http_call_c_members.md)
- [HCHttpCallRequestSetRetryCacheId](https://docs.xbox.com/zh-CN/reference/live/httpclient/httpclient/functions/hchttpcallrequestsetretrycacheid.md)
- [HCHttpCallRequestGetRetryCacheId](https://docs.xbox.com/zh-CN/reference/live/httpclient/httpprovider/functions/hchttpcallrequestgetretrycacheid.md)
- [XblHttpCallRequestSetRetryAllowed](https://docs.xbox.com/zh-CN/reference/live/xsapi-c/http_call_c/functions/xblhttpcallrequestsetretryallowed.md)
- [HCHttpCallRequestSetRetryAllowed](https://docs.xbox.com/zh-CN/reference/live/httpclient/httpclient/functions/hchttpcallrequestsetretryallowed.md)
