Partial snipe.server.ServerGame emulation for action scripts.

It is available only on Snipe Kit server.

Constructor

Fields

Methods

debug (s:String):Void

Adds a debug message to project logs. Debug messages are not logged in production.

Parameters:

s

Log message.

error (s:String):Void

Adds an error message to project logs.

Parameters:

s

Log message.

log (s:String):Void

Adds a message to project logs.

Parameters:

s

Log message.

time ():Float

Sys.time() wrapper.

timeInt ():Int

Sys.time() wrapper. Returns Int.

urlRequest (url:String, method:String, params:Dynamic, ?responseAction:String, ?responseParams:Dynamic):Void

Wrapper on top of snipe.server.URLRequester.send().

Parameters:

url

URL string.

method

HTTP request method, "get" or "post".

params

HTTP request parameters object. If the object contains field "_postData" (String), it will be used to set POST request data. If the object contains field "_headers" (Map), it will be used to set request headers. If the object contains field "_ignoreErrors" (Bool) and it is set to true, HTTP error codes will be ignored and callback will run. Connection errors will still be considered fatal.

responseAction

(optional) Response handler kit action (Custom type). The params variable in this action will have "response" string field defined.

responseParams

(optional) Additional response handler parameters.