summaryrefslogtreecommitdiffhomepage
path: root/modules/luci-base/htdocs/luci-static/resources/rpc.js
diff options
context:
space:
mode:
Diffstat (limited to 'modules/luci-base/htdocs/luci-static/resources/rpc.js')
-rw-r--r--modules/luci-base/htdocs/luci-static/resources/rpc.js6
1 files changed, 4 insertions, 2 deletions
diff --git a/modules/luci-base/htdocs/luci-static/resources/rpc.js b/modules/luci-base/htdocs/luci-static/resources/rpc.js
index 9b642444fa..20b77c18fc 100644
--- a/modules/luci-base/htdocs/luci-static/resources/rpc.js
+++ b/modules/luci-base/htdocs/luci-static/resources/rpc.js
@@ -1,4 +1,6 @@
'use strict';
+'require baseclass';
+'require request';
var rpcRequestID = 1,
rpcSessionID = L.env.sessionid || '00000000000000000000000000000000',
@@ -14,7 +16,7 @@ var rpcRequestID = 1,
* The `LuCI.rpc` class provides high level ubus JSON-RPC abstractions
* and means for listing and invoking remove RPC methods.
*/
-return L.Class.extend(/** @lends LuCI.rpc.prototype */ {
+return baseclass.extend(/** @lends LuCI.rpc.prototype */ {
/* privates */
call: function(req, cb, nobatch) {
var q = '';
@@ -35,7 +37,7 @@ return L.Class.extend(/** @lends LuCI.rpc.prototype */ {
q += '/%s.%s'.format(req.params[1], req.params[2]);
}
- return L.Request.post(rpcBaseURL + q, req, {
+ return request.post(rpcBaseURL + q, req, {
timeout: (L.env.rpctimeout || 20) * 1000,
nobatch: nobatch,
credentials: true