---
name: "webRequest"
type: command
status: ok
groups: ["System"]
arma3_since: "2.24"
branch: "dev"
locality: {"argument": null, "effect": null, "server_exec": false}
source: https://community.bistudio.com/wiki/webRequest
revid: 379580
updated: 2026-11-02T16:56:42Z
---

# webRequest

*Command · System · Arma 3 v2.24 · branch: dev*

## Description

Create a web request returning an SQF promise, allowing communication with web servers in game.

> [!NOTE]
> See [WebAPI](../topics/WebAPI.md) for a full tutorial.

## Syntax

```sqf
webRequest request
```

**Parameters:**

- `request`: [HashMap](../topics/HashMap.md)

**Returns:** [Script Handle](../topics/Script_Handle.md) - a [promise](../topics/Script_Handle.md#promise-handles)

## Examples

### Example 1

```sqf
spawn {
    private _handle = webRequest #{
        "type": "http",
        //"method": "GET", "GET" is default
        "origin": "test",
        "url": "https://myip.wtf/text"
    };
    private _result = waitUntil _handle; // suspend until it is ready
    _result params ["_request", "_result"];
    systemChat format ["My IP is: %1", _result get "body"];
};
```

## See also

[callExtension](../commands/callExtension.md) · [connectToServer](../commands/connectToServer.md)

<sub>Source: [BI Community Wiki — webRequest](https://community.bistudio.com/wiki/webRequest) (revision 379580).</sub>
