sendCloudRequestClient

From Bohemia Interactive Community
Revision as of 20:44, 7 December 2023 by Lou Montana (talk | contribs) (Fix)
(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 client request to the BI cloud service and executes callback code with server's response.
Multiplayer:
Only works on player clients and requires player to be logged in; on dedicated server and headless clients, use sendCloudRequestServer).
Groups:
Argo

Syntax

Syntax:
sendCloudRequestClient [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 = sendCloudRequestClient ["users/current", "hint 'success'", player];

Additional Information

See also:
sendCloudRequestServer 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