Methods
abort()
Ignored for backwards compatibility.
This function does nothing.
busy() → {boolean}
Checks the running state of the request.
Returns:
Returns true
if the request is still running or false
if it
already completed.
- Type
- boolean
cancel()
Cancels a running request.
This function does not actually cancel the underlying
XMLHTTPRequest
request but it sets a flag which prevents the
invocation of the callback function when the request eventually
finishes or timed out.
get(url, dataopt, callbackopt, timeoutopt) → {Promise.<null>}
This function is a legacy wrapper around
LuCI.get()
.
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
url |
string | The URL to request |
|
data |
Object |
<optional> |
Additional query string data |
callback |
LuCI.requestCallbackFn |
<optional> |
Callback function to invoke on completion |
timeout |
number |
<optional> |
Request timeout to use |
Returns:
- Type
- Promise.<null>
post(url, dataopt, callbackopt, timeoutopt) → {Promise.<null>}
This function is a legacy wrapper around
LuCI.post()
.
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
url |
string | The URL to request |
|
data |
Object |
<optional> |
Additional data to append to the request body. |
callback |
LuCI.requestCallbackFn |
<optional> |
Callback function to invoke on completion |
timeout |
number |
<optional> |
Request timeout to use |
Returns:
- Type
- Promise.<null>
send_form()
Existing for backwards compatibility.
This function simply throws an InternalError
when invoked.
Throws:
-
Throws an
InternalError
with the messageNot implemented
when invoked. - Type
- InternalError