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

# XblHttpCallCreate

> XblHttpCallCreate

# XblHttpCallCreate

Crée un handle d'appel HTTP.

## Syntaxe

```cpp theme={null}
HRESULT XblHttpCallCreate(  
         XblContextHandle xblContext,  
         const char* method,  
         const char* url,  
         XblHttpCallHandle* call  
)  
```

### Paramètres

*xblContext*   \_In\_\
Type : [XblContextHandle](/fr-CA/reference/live/xsapi-c/types_c/handles/xblcontexthandle)

Contexte XBOX Live qui fournit le contexte utilisateur pour autoriser l'appel.

*method*   \_In\_z\_\
Type : char\*

Méthode encodée en UTF-8 pour l'appel HTTP.

*url*   \_In\_z\_\
Type : char\*

URL encodée en UTF-8 pour l'appel HTTP.

*call*   \_Out\_\
Type : [XblHttpCallHandle\*](/fr-CA/reference/live/xsapi-c/http_call_c/handles/xblhttpcallhandle)

Handle de l'appel HTTP.

### Valeur de retour

Type : HRESULT

Code de résultat de cette opération d'API. Les valeurs possibles sont S\_OK, E\_INVALIDARG ou E\_FAIL.

## Remarques

Créez d'abord un handle HTTP à l'aide de XblHttpCallCreate(). Appelez ensuite XblHttpCallRequestSet\*() pour préparer le XblHttpCallHandle. Appelez ensuite XblHttpCallPerformAsync() pour effectuer l'appel HTTP à l'aide du XblHttpCallHandle. Cet appel est asynchrone; le travail sera donc effectué sur un thread d'arrière-plan et le résultat sera retourné par l'intermédiaire du rappel. L'appel d'exécution est asynchrone; le travail sera donc effectué sur un thread d'arrière-plan qui appelle XTaskQueueDispatch(..., XTaskQueuePort::Work). Les résultats seront retournés au rappel sur le thread qui appelle XTaskQueueDispatch(..., XTaskQueuePort::Completion); obtenez ensuite le résultat de l'appel HTTP en appelant XblHttpCallResponseGet\*() pour obtenir la réponse HTTP du XblHttpCallHandle. Lorsque le XblHttpCallHandle n'est plus nécessaire, appelez [XblHttpCallCloseHandle](/fr-CA/reference/live/xsapi-c/http_call_c/functions/xblhttpcallclosehandle) pour libérer la mémoire associée au XblHttpCallHandle.

## Configuration requise

**En-tête :** http\_call\_c.h

**Bibliothèque :** Microsoft.Xbox.Services.14x.GDK.C.lib

## Voir aussi

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


## Related topics

- [XblHttpCallCreate](/reference/live/xsapi-c/http_call_c/functions/xblhttpcallcreate.md)
- [XblHttpCallPerformAsync](/reference/live/xsapi-c/http_call_c/functions/xblhttpcallperformasync.md)
- [HTTP and WebSocket web requests in the GDK](/build/console-features/networking/web-requests/http-networking.md)
- [HCHttpCallCreate](/reference/live/httpclient/httpclient/functions/hchttpcallcreate.md)
- [XblHttpCallRequestSetLongHttpCall](/reference/live/xsapi-c/http_call_c/functions/xblhttpcallrequestsetlonghttpcall.md)
