lb.core.plugins.server

Asynchronous Communication with a Remote Server Plugin for the Sandbox API

Authors

Copyright

Eric Bréchemier © 2011, Some Rights Reserved Legal-Box SAS © 2010-2011, All Rights Reserved

License

BSD License http://creativecommons.org/licenses/BSD/

Version

2011-08-14

Summary
lb.core.plugins.serverAsynchronous Communication with a Remote Server Plugin for the Sandbox API
Functions
server(sandbox)Define methods in the ‘server’ property of given sandbox.
sandbox.server.send(url,data,receive)Send and receive data from the remote host.

Functions

server(sandbox)

Define methods in the ‘server’ property of given sandbox.

Parameters

sandboxobject, the sandbox instance to enrich with the send method

sandbox.server.send(url,data,receive)

Send and receive data from the remote host.

Parameters

urlstring, a url on remote host (must respect same origin policy)
dataobject, the data to send to the server.  It must be valid JSON.
receivefunction, the callback with data received in response from the server.  The data provided in argument will be a valid JSON object or array.
Close