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

Creates an HTTP call handle.

## Syntax

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

### Parameters

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

XBOX Live context that provides user context for authorizing the call.

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

UTF-8 encoded method for the HTTP call.

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

UTF-8 encoded URL for the HTTP call.

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

The handle of the HTTP call.

### Return value

Type: HRESULT

Result code for this API operation. Possible values are S\_OK, E\_INVALIDARG, or E\_FAIL.

## Remarks

First create an HTTP handle using XblHttpCallCreate(). Then call XblHttpCallRequestSet\*() to prepare the XblHttpCallHandle. Then call XblHttpCallPerformAsync() to perform HTTP call using the XblHttpCallHandle. This call is asynchronous, so the work will be done on a background thread and will return via the callback. The perform call is asynchronous, so the work will be done on a background thread which calls XTaskQueueDispatch(..., XTaskQueuePort::Work). The results will return to the callback on the thread that calls XTaskQueueDispatch(..., XTaskQueuePort::Completion), then get the result of the HTTP call by calling XblHttpCallResponseGet\*() to get the HTTP response of the XblHttpCallHandle. When the XblHttpCallHandle is no longer needed, call [XblHttpCallCloseHandle](/reference/live/xsapi-c/http_call_c/functions/xblhttpcallclosehandle) to free the memory associated with the XblHttpCallHandle.

## Requirements

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

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

## See also

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


## Related topics

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