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

Crea un identificador de llamada HTTP.

## Sintaxis

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

### Parámetros

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

Contexto de XBOX Live que proporciona el contexto de usuario para autorizar la llamada.

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

Método codificado en UTF-8 para la llamada HTTP.

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

Dirección URL codificada en UTF-8 para la llamada HTTP.

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

El identificador de la llamada HTTP.

### Valor devuelto

Tipo: HRESULT

Código de resultado para esta operación de API. Los valores posibles son S\_OK, E\_INVALIDARG o E\_FAIL.

## Comentarios

Primero cree un identificador HTTP mediante XblHttpCallCreate(). A continuación, llame a XblHttpCallRequestSet\*() para preparar el XblHttpCallHandle. Después, llame a XblHttpCallPerformAsync() para realizar la llamada HTTP mediante el XblHttpCallHandle. Esta llamada es asincrónica, por lo que el trabajo se realizará en un subproceso en segundo plano y se devolverá a través de la devolución de llamada. La llamada de ejecución es asincrónica, por lo que el trabajo se realizará en un subproceso en segundo plano que llama a XTaskQueueDispatch(..., XTaskQueuePort::Work). Los resultados se devolverán a la devolución de llamada en el subproceso que llama a XTaskQueueDispatch(..., XTaskQueuePort::Completion); después, obtenga el resultado de la llamada HTTP llamando a XblHttpCallResponseGet\*() para obtener la respuesta HTTP del XblHttpCallHandle. Cuando ya no se necesite el XblHttpCallHandle, llame a [XblHttpCallCloseHandle](/reference/live/xsapi-c/http_call_c/functions/xblhttpcallclosehandle) para liberar la memoria asociada con el XblHttpCallHandle.

## Requisitos

**Encabezado:** http\_call\_c.h

**Biblioteca:** Microsoft.Xbox.Services.14x.GDK.C.lib

## Consulte también

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


## Related topics

- [XblHttpCallPerformAsync](/es/reference/live/xsapi-c/http_call_c/functions/xblhttpcallperformasync.md)
- [HCHttpCallCreate](/es/reference/live/httpclient/httpclient/functions/hchttpcallcreate.md)
- [XblHttpCallRequestSetLongHttpCall](/es/reference/live/xsapi-c/http_call_c/functions/xblhttpcallrequestsetlonghttpcall.md)
- [XblHttpCallGetHeader](/es/reference/live/xsapi-c/http_call_c/functions/xblhttpcallgetheader.md)
- [XblHttpCallCloseHandle](/es/reference/live/xsapi-c/http_call_c/functions/xblhttpcallclosehandle.md)
