Ashasekayi (Talk | contribs) |
Ashasekayi (Talk | contribs) |
||
Line 3: | Line 3: | ||
==Fields== | ==Fields== | ||
{{ScriptFunction|string|Error|{ get; }|Any error, will be empty or null if the request was successful|5 = local response = function(data)<br> | {{ScriptFunction|string|Error|{ get; }|Any error, will be empty or null if the request was successful|5 = local response = function(data)<br> | ||
− | if data.Error == nil then<br> | + | if data.'''Error''' == nil then<br> |
Space.Log("Data Loaded")<br> | Space.Log("Data Loaded")<br> | ||
Space.Log(data.Response)<br> | Space.Log(data.Response)<br> | ||
Line 13: | Line 13: | ||
{{ScriptFunction|string|Response|{ get; }|The body text of the webpage response if error is empty or null|5 = local response = function(data)<br> | {{ScriptFunction|string|Response|{ get; }|The body text of the webpage response if error is empty or null|5 = local response = function(data)<br> | ||
if data.Error == nil then<br> | if data.Error == nil then<br> | ||
− | Space.Log(data.Response)<br> | + | Space.Log(data.'''Response''')<br> |
end<br> | end<br> | ||
end}} | end}} | ||
{{Scripting Navbox}} | {{Scripting Navbox}} |
The SWebResponse class returns the result of a HTTP GET/POST request
Any error, will be empty or null if the request was successful
if data.Error == nil then
Space.Log("Data Loaded")
Space.Log(data.Response)
else
Space.Log("Error Found")
end
The body text of the webpage response if error is empty or null
if data.Error == nil then
Space.Log(data.Response)
end
|