From baa727de93db009f90d70a80a9861758a24eae77 Mon Sep 17 00:00:00 2001 From: Jo-Philipp Wich Date: Tue, 5 Nov 2019 10:27:59 +0100 Subject: docs: rename documentation folder to docs Signed-off-by: Jo-Philipp Wich --- docs/jsapi/LuCI.Response.html | 1855 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 1855 insertions(+) create mode 100644 docs/jsapi/LuCI.Response.html (limited to 'docs/jsapi/LuCI.Response.html') diff --git a/docs/jsapi/LuCI.Response.html b/docs/jsapi/LuCI.Response.html new file mode 100644 index 0000000000..a7398ef507 --- /dev/null +++ b/docs/jsapi/LuCI.Response.html @@ -0,0 +1,1855 @@ + + + + + Class: Response + + + + + + + + + + + + + + + + + +
+ + +
+

Class: Response

+ + + + +
+ +
+

+ LuCI. + + Response +

+ +

The Response class is an internal utility class representing HTTP responses.

+ +
+ +
+
+ + + + +
+
+

+ + new LuCI.Response() +

+ + +
+ luci.js, line 377 +
+ +
+ + +
+
+ + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + +

Members

+ +
+ +
+
+

durationnumber

+
+ + +
+
+ +
+

The total duration of the HTTP request in milliseconds

+
+ + + +
+ + + + + + + + + + + + + + + + + + + + + +
+ + + +
+ + + +
+
+

headersLuCI.Headers

+
+ + +
+
+ +
+

The HTTP headers of the response

+
+ + + +
+ + + + + + + + + + + + + + + + + + + + + +
+ + + +
+ + + +
+
+

okboolean

+
+ + +
+
+ +
+

Describes whether the response is successful (status codes 200..299) or not

+
+ + + +
+ + + + + + + + + + + + + + + + + + + + + +
+ + + +
+ + + +
+
+

statusnumber

+
+ + +
+
+ +
+

The numeric HTTP status code of the response

+
+ + + +
+ + + + + + + + + + + + + + + + + + + + + +
+ + + +
+ + + +
+
+

statusTextstring

+
+ + +
+
+ +
+

The HTTP status description message of the response

+
+ + + +
+ + + + + + + + + + + + + + + + + + + + + +
+ + + +
+ + + +
+
+

urlstring

+
+ + +
+
+ +
+

The final URL of the request, i.e. after following redirects.

+
+ + + +
+ + + + + + + + + + + + + + + + + + + + + +
+ + + +
+ +
+ + + +

Methods

+ +
+ +
+
+

+ + clone(content){LuCI.Response} +

+ + +
+ luci.js, line 465 +
+ +
+ + +
+
+ + +
+

Clones the given response object, optionally overriding the content +of the cloned instance.

+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
content + + +* + + + + + + + optional + + + + + +

Override the content of the cloned response. Object values will be +treated as JSON response data, all other types will be converted +using String() and treated as response text.

+ + + +
+ + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + +
Returns:
+ + + + + + + + + + + + + + + + + + + + +
TypeDescription
+ + LuCI.Response + + + The cloned Response instance.
+ + + + +
+ + + +
+
+

+ + json(){*} +

+ + +
+ luci.js, line 486 +
+ +
+ + +
+
+ + +
+

Access the response content as JSON data.

+
+ + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + +
Throws:
+ + + +
+
+
+

Throws SyntaxError if the content isn't valid JSON.

+
+
+
+
+
+ Type +
+
+ +SyntaxError + + +
+
+
+
+ + + + + +
Returns:
+ + + + + + + + + + + + + + + + + + + + +
TypeDescription
+ + * + + + The parsed JSON data.
+ + + + +
+ + + +
+
+

+ + text(){string} +

+ + +
+ luci.js, line 501 +
+ +
+ + +
+
+ + +
+

Access the response content as string.

+
+ + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + +
Returns:
+ + + + + + + + + + + + + + + + + + + + +
TypeDescription
+ + string + + + The response content.
+ + + + +
+ +
+ + + + + + + +
+ +
+ + + + + + + +
+ Documentation generated by JSDoc 3.6.3 on Tue Nov 05 2019 10:17:12 GMT+0100 (Central European Standard Time) +
+
+
+ + + + \ No newline at end of file -- cgit v1.2.3