Jump to content

Search the Community

Showing results for tags 'requests'.



More search options

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • BOHEMIA INTERACTIVE
    • BOHEMIA INTERACTIVE - NEWS
    • BOHEMIA INTERACTIVE - JOBS
    • BOHEMIA INTERACTIVE - GENERAL
  • FEATURED GAMES
    • Arma Reforger
    • Vigor
    • DAYZ
    • ARMA 3
    • ARMA 2
    • YLANDS
  • MOBILE GAMES
    • ARMA MOBILE OPS
    • MINIDAYZ
    • ARMA TACTICS
    • ARMA 2 FIRING RANGE
  • BI MILITARY GAMES FORUMS
  • BOHEMIA INCUBATOR
    • PROJECT LUCIE
  • OTHER BOHEMIA GAMES
    • ARGO
    • TAKE ON MARS
    • TAKE ON HELICOPTERS
    • CARRIER COMMAND: GAEA MISSION
    • ARMA: ARMED ASSAULT / COMBAT OPERATIONS
    • ARMA: COLD WAR ASSAULT / OPERATION FLASHPOINT
    • IRON FRONT: LIBERATION 1944
    • BACK CATALOGUE
  • OFFTOPIC
    • OFFTOPIC
  • Die Hard OFP Lovers' Club's Topics
  • ArmA Toolmakers's Releases
  • ArmA Toolmakers's General
  • Japan in Arma's Topics
  • Arma 3 Photography Club's Discussions
  • The Order Of the Wolfs- Unit's Topics
  • 4th Infantry Brigade's Recruitment
  • 11th Marine Expeditionary Unit OFFICIAL | 11th MEU(SOC)'s 11th MEU(SOC) Recruitment Status - OPEN
  • Legion latina semper fi's New Server Legion latina next wick
  • Legion latina semper fi's https://www.facebook.com/groups/legionlatinasemperfidelis/
  • Legion latina semper fi's Server VPN LEGION LATINA SEMPER FI
  • Team Nederland's Welkom bij ons club
  • Team Nederland's Facebook
  • [H.S.O.] Hellenic Special Operations's Infos
  • BI Forum Ravage Club's Forum Topics
  • Exilemod (Unofficial)'s General Discussion
  • Exilemod (Unofficial)'s Scripts
  • Exilemod (Unofficial)'s Addons
  • Exilemod (Unofficial)'s Problems & Bugs
  • Exilemod (Unofficial)'s Exilemod Tweaks
  • Exilemod (Unofficial)'s Promotion
  • Exilemod (Unofficial)'s Maps - Mission Files
  • TKO's Weferlingen
  • TKO's Green Sea
  • TKO's Rules
  • TKO's Changelog
  • TKO's Help
  • TKO's What we Need
  • TKO's Cam Lao Nam
  • MSOF A3 Wasteland's Server Game Play Features
  • MSOF A3 Wasteland's Problems & Bugs
  • MSOF A3 Wasteland's Maps in Rotation
  • SOS GAMING's Server
  • SOS GAMING's News on Server
  • SOS GAMING's Regeln / Rules
  • SOS GAMING's Ghost-Town-Team
  • SOS GAMING's Steuerung / Keys
  • SOS GAMING's Div. Infos
  • SOS GAMING's Small Talk
  • NAMC's Topics
  • NTC's New Members
  • NTC's Enlisted Members
  • The STATE's Topics
  • CREATEANDGENERATION's Intoduction
  • CREATEANDGENERATION's HAVEN EMPIRE (NEW CREATORS COMMUNITY)
  • HavenEmpire Gaming community's HavenEmpire Gaming community
  • Polska_Rodzina's Polska_Rodzina-ARGO
  • Carrier command tips and tricks's Tips and tricks
  • Carrier command tips and tricks's Talk about carrier command
  • ItzChaos's Community's Socials
  • Photography club of Arma 3's Epic photos
  • Photography club of Arma 3's Team pics
  • Photography club of Arma 3's Vehicle pics
  • Photography club of Arma 3's Other
  • Spartan Gamers DayZ's Baneados del Servidor
  • Warriors Waging War's Vigor
  • Tales of the Republic's Republic News
  • Operazioni Arma Italia's CHI SIAMO
  • [GER] HUSKY-GAMING.CC / Roleplay at its best!'s Starte deine Reise noch heute!
  • empire brotherhood occult +2349082603448's empire money +2349082603448
  • NET88's Twitter

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


Website URL


Yahoo


Jabber (xmpp)


Skype


Biography


Twitter


Google+


Youtube


Vimeo


Xfire


Steam url id


Raptr


MySpace


Linkedin


Tumblr


Flickr


XBOX Live


PlayStation PSN


Origin


PlayFire


SoundCloud


Pinterest


Reddit


Twitch.Tv


Ustream.Tv


Duxter


Instagram


Location


Interests


Interests


Occupation

Found 1 result

  1. Extension to make http requests, currently supporting: GET POST PATCH DELETE PUT First parameter is the mode. Second is the method. Third is the url. Fourth is the authorization, if no authorization needed just pass null Fifth is the request body, only used by POST, PATCH and PUT, if no body needed just pass {} GET request example: "ArmaRequests" callExtension "0|GET|http://headers.jsontest.com/|null"; waitUntil {sleep 1; "ArmaRequests" callExtension "2" == "OK"}; _response = "ArmaRequests" callExtension "1"; _parsedResponse = parseSimpleArray _response; _code = _parsedResponse select 0; _data = _parsedResponse select 1; //Response => [["X-Cloud-Trace-Context","47e3637379c2b3d638285b973e0e4f96/4228286279360018440"],["Host","headers.jsontest.com"]] POST request example: "ArmaRequests" callExtension '0|POST|url|Bot ksZc83aS|{"Number": 4, "String": "String"}'; waitUntil {sleep 1; "ArmaRequests" callExtension "2" == "OK"}; _response = "ArmaRequests" callExtension "1"; _parsedResponse = parseSimpleArray _response; _code = _parsedResponse select 0; _data = _parsedResponse select 1; Every response comes with a status code 0: All data received 1: There's still data to receive 9: Error The codes you can use are 0: New request 1: Receive data 2: Get extension status 3: Parse JSON //Example: "ArmaRequests" callExtensions '3|{"age": 80}'; Due to string length limitations, if the response exceeds that limit it will be sent in chunks with status code 1, to receive the chunk use _fullResponse = ""; // _chunkResponse = "ArmaRequests" callExtension "1"; _parsedChunkResponse = parseSimpleArray _chunkResponse; _code = _chunkResponse select 0; _data = _chunkResponse select 1; _fullResponse = _fullResponse + _data; //You must repeat the receiving process until it responds with a code 0 When there's no more data left, it will respond with a code 0. JSON responses are automatically parsed into arrays, all common variables type are supported. Example code _fullResponse = ""; "ArmaRequests" callExtension "0|GET|http://headers.jsontest.com/|null"; //Send request waitUntil {sleep 1; "ArmaRequests" callExtension "2" == "OK"}; _response = "ArmaRequests" callExtension "1"; _parsedResponse = parseSimpleArray _response; //Parse response _code = _parsedResponse select 0; //Save code and data _data = _parsedResponse select 1; if (_code != 9) then { //Check if is a error _fullResponse = _data; //Assign the data in the full response while {_code == 1} do { //if there's more data receive it _chunkResponse = "ArmaRequests" callExtension "1"; //Receive next chunk data _parsedChunkResponse = parseSimpleArray _chunkResponse; //Parse the chunk data _code = _parsedChunkResponse select 0; //Update the status code _data = _parsedChunkResponse select 1; //Save the data if (_code == 9) exitWith {hint "Error : " + _data;}; //Check if is a error _fullResponse = _fullResponse + _data; //Append the chunk to the full response }; hint str _fullResponse; } else { hint "Error during request " + _data; }; There's also a callback version "ArmaRequestsCallback" callExtension "callbackFunction|Method|url|authorization?|body?"; Example using callback version and normal version TAG_fnc_DiscordMessageSent = { params["_data"]; //[["id","651314298001424405"],["type",0],["content","Hello"],["channel_id","649607925760786442"],["author",[["id","629121190182780929"],["username","Fantasia"],["avatar",null],["discriminator","2964"],["bot",true]]],["attachments",[]],["embeds",[]],["mentions",[]],["mention_roles",[]],["pinned",false],["mention_everyone",false],["tts",false],["timestamp","2019-12-03T06:50:29.478000+00:00"],["edited_timestamp",null],["flags",0],["nonce",null]] _content = (_data select 2) select 1; _username = (((_data select 4) select 1) select 1) select 1; _channelId = (_data select 3) select 1; "ArmaRequests" callExtension format["0|GET|https://discordapp.com/api/v6/channels/%1|Bot TOKEN|{}", _channelId]; waitUntil {sleep 1; "ArmaRequests" callExtension "2" == "OK"}; _channelData = (parseSimpleArray ("ArmaRequests" callExtension "1")) select 1; _channelName = (_channelData select 3) select 1; _guildId = (_channelData select 7) select 1; "ArmaRequests" callExtension format["0|GET|https://discordapp.com/api/v6/guilds/%1|Bot TOKEN|{}", _guildId]; waitUntil {sleep 1; "ArmaRequests" callExtension "2" == "OK"}; _guildData = (parseSimpleArray ("ArmaRequests" callExtension "1")) select 1; _guildName = (_guildData select 1) select 1; hint format["Sent %1 as %2 in the channel %3 of the guild %4", _content, _username, _channelName, _guildName]; }; addMissionEventHandler ["ExtensionCallback", { params["_name", "_function", "_data"]; if (_name == "ArmaRequestsCallback_JSON") then { [parseSimpleArray _data] spawn (missionNamespace getVariable [_function, { diag_log format["ArmaRequestsCallback: Tried to call %1, but isn't defined", _function]; }]); }; if (_name == "ArmaRequestsCallback_Error") then { hint "Request error: " + _data; }; if (_name == "ArmaRequestsCallback_TEXT") then { systemChat _data; }; }]; "ArmaRequestsCallback" callExtension "TAG_fnc_DiscordMessageSent|POST|https://discordapp.com/api/v6/channels/649607925760786442/messages|Bot BOT|{""content"": ""Hello"", ""tts"": false}"; Download link: https://drive.google.com/file/d/1-9oW3PhArHbs15AS4c6R5UQuuk6usInC/view
×