wiki.sine.space | sinespace

Difference between revisions of "Scripting/SWebResponse"

From wiki.sine.space
Jump to: navigation, search
 
(3 intermediate revisions by one other user not shown)
Line 1: Line 1:
The SWebResponse class returns the result of a HTTP GET/POST request
+
This page has moved to: https://docs.sine.space/v/scripting/client-scripting/types/swebresponse
 
+
==Fields==
+
{{ScriptFunction|string|Error|{ get; }|Any error, will be empty or null if the request was successful|5 = local response = function(data)<br>
+
&nbsp;&nbsp;if  data.Error == "" then<br>
+
&nbsp;&nbsp;&nbsp;&nbsp;Space.Log("Data Loaded")<br>
+
&nbsp;&nbsp;&nbsp;&nbsp;Space.Log(data.Response)<br>
+
&nbsp;&nbsp;else<br>
+
&nbsp;&nbsp;&nbsp;&nbsp;Space.Log("Error Found")<br>
+
&nbsp;&nbsp;end<br>   
+
end}}
+
 
+
{{ScriptFunction|string|Response|{ get; }|The body text of the webpage response if error is empty or null|5 = local response = function(data)<br>
+
&nbsp;&nbsp;if  data.Error == "" then<br>
+
&nbsp;&nbsp;&nbsp;&nbsp;Space.Log(data.Response)<br>
+
&nbsp;&nbsp;end<br>   
+
end}}
+
 
+
{{Scripting Navbox}}
+

Latest revision as of 07:05, 19 September 2022

This page has moved to: https://docs.sine.space/v/scripting/client-scripting/types/swebresponse