code34 248 Posted April 20, 2019 ArmaWSLastest Version : 0.2 by Code34 ____________________________________________________________________________________________________________________ Direct Download from Dropbox Github: https://github.com/code34/armaws_x64 ArmaWS is a json client extension that permits from Arma to exchange with remote host json files. Exemple1 Send a JSON file to httpbin server and retrieve a json file convert into an arma array private _armaws = "new" call OO_ARMAWS; private _params = [["username","code34"],["message","hello world"],["id", 103],["type","soldier"]]; ["setUrl", "https://httpbin.org/post"] call _armaws; _result = ["callWs", _params] call _armaws; hintc format["%1",_result]; Exemple2 Send a message to a chan text on Discord through a webhook private _armaws = "new" call OO_ARMAWS; private _params = [["username","R2D2"],["content","hello world"]]; ["setUrl", yourwebhookurl] call _armaws; ["callWs", _params] call _armaws; README Quote # ArmaWS Description: A JSON client dll for ARMA3 Author: code34 nicolas_boiteux@yahoo.fr Copyright (C) 2019 Nicolas BOITEUX - License MIT # How to install: 1- Unpack the archive and copy the entire "@armaws_x64" folder into the ARMA3 root directory. The @inibdi2 folder should look like this: ../Arma 3/@armaws/armaws_x64.dll ../Arma 3/@armaws/Addons/armaws.pbo 2- check armaws_x64.dll execution permissions, right click on it, and authorize it. 3- check in Arma3 launcher, that Battleye is turn off until BIS whitelist the dll # Changelog - version 0.2 : first official release DOCUMENTATION Quote Author: code34 nicolas_boiteux@yahoo.fr Copyright (C) 2019 Nicolas BOITEUX CLASS OO_ARMAWS MIT License Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -------------------------------------------------------------------------------------------------------------- Function: _armaws = "new" call OO_ARMAWS; Return a new OO_ARMAWS object -------------------------------------------------------------------------------------------------------------- Function: _version = "getVersion" call _armaws; Return string armaws version ------------------------------------------------------------------------------------------------------------- Function: _return = ["callWs", [[key, value],[key,value],..]] call _armaws; params: one array that contains n array wich must associated a key with its value return: [] is returned if nothing is returned by remote host, or exception [[key, value],[key,value],..] an array containg the response of remote host If you request for an int/float type value, you have to convert it from string with arma3 parsenumber command ------------------------------------------------------------------------------------------------------------- Function: ["setUrl", url] call _armaws; params: url : string url (eg: "https://httpbin.org/post") nothing is return -------------------------------------------------------------------------------------------------------------- Function: ["delete", _armaws] call OO_ARMAWS; Destroy the template object Parameters: object - armaws object Return : nothing Have fun 🙂 2 2 Share this post Link to post Share on other sites
Dragon_GER 19 Posted April 20, 2019 Cool stuff! I am gonna try it out for sure. Is your extension battleye approved? Otherwise it will be for limited use on server side only. Share this post Link to post Share on other sites
code34 248 Posted April 20, 2019 thanks you 🙂 As i just released it, it has not been yet whitelist. Share this post Link to post Share on other sites
Dragon_GER 19 Posted April 20, 2019 Oh thinking about cool features: Could you extend this to an API interacting Framework featuring functions to enable us doing post and get requests with json returns? Share this post Link to post Share on other sites
code34 248 Posted April 21, 2019 8 hours ago, Dragon_GER said: Oh thinking about cool features: Could you extend this to an API interacting Framework featuring functions to enable us doing post and get requests with json returns? could you give me an example of interaction ? 😄 Share this post Link to post Share on other sites