wiki.sine.space | sinespace

Difference between revisions of "Scripting/SWebService"

From wiki.sine.space
Jump to: navigation, search
(Created page with "The SWebService class allows you to contact servers you control via HTTP[S] and GET or POST data strings. ==Whitelisting== To prevent Space users from unintentionally becomin...")
 
(Replaced content with "This page has moved to: https://docs.sine.space/v/scripting/client-scripting/network/swebservice")
 
(16 intermediate revisions by 5 users not shown)
Line 1: Line 1:
The SWebService class allows you to contact servers you control via HTTP[S] and GET or POST data strings.
+
This page has moved to: https://docs.sine.space/v/scripting/client-scripting/network/swebservice
 
+
==Whitelisting==
+
To prevent Space users from unintentionally becoming part of a DDoS botnet, the Space client will first check for a file on a domain before allowing communications with the domain. If this file cannot be found, it will no longer communicate with that domain until the user logs.
+
 
+
To setup your server for communication with space, in the root of your domain, on the port you are using, place a file named 'sinewave.space.scripting.txt' containing 'SPACE_OK'. E.g. http://somewhere.com/sinewave.space.scripting.txt - if this file is not present, you will be unable to use scripting to communicate with the domain.
+
 
+
==Members==
+
{{ScriptFunction|void|Get|(string url, Action<SWebResponse> onComplete);|Performs a HTTP[S] GET against URL and returns the contents as a SWebResponse}}
+
{{ScriptFunction|void|Post|(string url, string data, Action<SWebResponse> onComplete);|Performs a HTTP[S] POST against URL using data as a post string and returns the contents as a SWebResponse}}
+
{{ScriptFunction|SResource|GetImage|(string url);|Returns a valid SResource for a image on a remote domain that can be used via e.g. [[Scripting/SMaterial]]. While the image loads, it will be a white pixel that will be substituted with the real image once loaded.}}
+
 
+
{{Scripting Navbox}}
+

Latest revision as of 07:06, 19 September 2022

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