{"name":"webRequest","title":"webRequest","type":"command","url":"https://community.bistudio.com/wiki/webRequest","revid":379580,"updated":"2026-11-02T16:56:42Z","groups":["System"],"status":"ok","games":{"arma3":"2.24"},"since":"arma3 2.24","arma3_since":"2.24","branch":["dev"],"description":"Create a web request returning an SQF promise, allowing communication with web servers in game.\n\n> [!NOTE]\n> See WebAPI for a full tutorial.","syntaxes":[{"syntax":"webRequest request","params":[{"name":"request","type":"HashMap","type_expr":"HashMap"}],"returns":{"type":"Script Handle","type_expr":"Script Handle","description":"a promise"},"form":"unary","right":{"text":"request"}}],"examples":[{"text":"```sqf\nspawn {\n    private _handle = webRequest #{\n        \"type\": \"http\",\n        //\"method\": \"GET\", \"GET\" is default\n        \"origin\": \"test\",\n        \"url\": \"https://myip.wtf/text\"\n    };\n    private _result = waitUntil _handle; // suspend until it is ready\n    _result params [\"_request\", \"_result\"];\n    systemChat format [\"My IP is: %1\", _result get \"body\"];\n};\n```","code":["spawn {\n\tprivate _handle = webRequest #{\n\t\t\"type\": \"http\",\n\t\t//\"method\": \"GET\", \"GET\" is default\n\t\t\"origin\": \"test\",\n\t\t\"url\": \"https://myip.wtf/text\"\n\t};\n\tprivate _result = waitUntil _handle; // suspend until it is ready\n\t_result params [\"_request\", \"_result\"];\n\tsystemChat format [\"My IP is: %1\", _result get \"body\"];\n};"]}],"see_also":["callExtension","connectToServer"]}