sendCloudRequestClient: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
(Page creation)
 
m (Fix)
 
Line 8: Line 8:
|descr= Sends a client request to the {{Name|bi|short}} cloud service and executes callback code with server's response.
|descr= Sends a client request to the {{Name|bi|short}} cloud service and executes callback code with server's response.


|mp= {{Feature|informative|Only works on player clients and requires player to be logged in; on dedicated server and {{Link|Arma 3: Headless Clients|headless clients}}, use [[sendCloudRequestServer]]).}}
|mp= {{Feature|informative|Only works on player clients and requires player to be logged in; on dedicated server and {{Link|Arma 3: Headless Client|headless clients}}, use [[sendCloudRequestServer]]).}}


|s1= [[sendCloudRequestClient]] [requestName, callback, data, httpMethod]
|s1= [[sendCloudRequestClient]] [requestName, callback, data, httpMethod]

Latest revision as of 20:44, 7 December 2023

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