sendCloudRequestServer

From Bohemia Interactive Community
Revision as of 21:44, 7 December 2023 by Lou Montana (talk | contribs) (Page creation)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search
Hover & click on the images for description

Description

Description:
Sends a server request to the BI cloud service and executes callback code with server's response.
Multiplayer:
Only works on dedicated servers and headless clients; for clients, use sendCloudRequestClient).
Groups:
Argo

Syntax

Syntax:
sendCloudRequestServer [requestName, callback, data, httpMethod]
Parameters:
requestName: String - can be anything but "users"
callback: String - (Optional, default "") code to be executed on request completion
data: Anything - (Optional, default "") JSON data to be sent
httpMethod: String - (Optional, default "GET", or "POST" if data is provided - case-insensitive) can be one of:
  • "POST"
  • "GET"
  • "DELETE"
  • "PUT"
Return Value:
Boolean - true on success, false otherwise

Examples

Example 1:
_result = sendCloudRequestServer ["users/current", "hint 'success'", player];

Additional Information

See also:
sendCloudRequestClient sendAnalyticEvent

Notes

Report bugs on the Feedback Tracker and/or discuss them on the Arma Discord or on the Forums.
Only post proven facts here! Add Note