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

# XblHttpCallRequestSetRetryAllowed

> XblHttpCallRequestSetRetryAllowed

# XblHttpCallRequestSetRetryAllowed

设置是否允许对此 HTTP 调用进行重试。

## 语法

```cpp theme={null}
HRESULT XblHttpCallRequestSetRetryAllowed(  
         XblHttpCallHandle call,  
         bool retryAllowed  
)  
```

### 参数

*call*   \_In\_\
类型：[XblHttpCallHandle](/reference/live/xsapi-c/http_call_c/handles/xblhttpcallhandle)

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

*retryAllowed*   \_In\_\
类型：bool

是否允许对此 HTTP 调用进行重试。

### 返回值

类型：HRESULT

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

## 备注

默认为 true。必须在调用 [XblHttpCallPerformAsync](/reference/live/xsapi-c/http_call_c/functions/xblhttpcallperformasync) 之前调用此函数。

## 要求

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

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

## 另请参阅

[http\_call\_c](/reference/live/xsapi-c/http_call_c/http_call_c_members)


## Related topics

- [HCHttpCallRequestSetRetryAllowed](/zh-CN/reference/live/httpclient/httpclient/functions/hchttpcallrequestsetretryallowed.md)
- [HCHttpCallRequestGetRetryAllowed](/zh-CN/reference/live/httpclient/httpprovider/functions/hchttpcallrequestgetretryallowed.md)
- [XblHttpCallRequestSetRetryCacheId](/zh-CN/reference/live/xsapi-c/http_call_c/functions/xblhttpcallrequestsetretrycacheid.md)
- [HCHttpCallRequestSetRetryDelay](/zh-CN/reference/live/httpclient/httpclient/functions/hchttpcallrequestsetretrydelay.md)
- [HCHttpCallRequestSetRetryCacheId](/zh-CN/reference/live/httpclient/httpclient/functions/hchttpcallrequestsetretrycacheid.md)
