So after latest updates i got problem with webrequests.EnqueuePost function - it not send post data to server, i'm receiving only get data (what is in url). Tested few times and got no data. Before latest rust/oxide update it was working fine.
Solved Webrequests.EnqueuePost not send post data to server
Discussion in 'Rust Development' started by AlexALX_[rus-ua], Mar 27, 2015.
-
Wulf Community Admin
Nothing has changed with web requests between this update and last weeks update. We'll look into it though.
-
Did you update Oxide? I had issues before I updated it
-
Hmm, then really strange, but i'm getting empty _POST on web server even if set paramethers like "test=1"
[DOUBLEPOST=1427497777,1427428051][/DOUBLEPOST]Any news? All mine server->web communications broken, nothing works. -
Wulf Community Admin
-
Ok here is example:
Code:PLUGIN.Title = "Test" PLUGIN.Description = "Test" PLUGIN.Author = "AlexALX" PLUGIN.Version = V(0, 0, 1) PLUGIN.HasConfig = falsefunction PLUGIN:OnPlayerChat(arg) if not arg then return end if not arg.connection then return end if not arg.connection.player then return end local player = arg.connection.player local chat = arg:GetString(0, "text") if (chat=="") then return end webrequests.EnqueuePost("http://localhost/test.php?key=test","test=1&arg=2", function(code, content) if(code == 200) then print(content) end end,self.object) end
PHP:<?php
print_r($_GET);
echo "\n\n";
print_r($_POST);
?>
Code:[Oxide] 11:00 AM [Info] Array ( [key] => test )Array ( )
-
copy & pasted your example:
Code:Array ( [key] => test )Array ( [test] => 1 [arg] => 2 )
-
After latest rust&oxide update and replacing everywhere to self.Plugin it starter working like before, really don't know where was issue but anyway thanks.