Sunday, February 21, 2010

DroidScript GET requests

Besides using the editor at http://droidscript.se you can also enter urls directly in the brower. There are some encoding issues, but its an entertaining demonstration.

Start the DroidScript application on the device, press menu button, and select "Start server". The actual ip-address of the device is displayed on the screen; in the following examples it is 192.168.0.100. DroidScript listens on port 4042. Then open a web browser and enter the following urls (note that we must encode + as %2B):
http://192.168.0.100:4042/eval/2*3
http://192.168.0.100:4042/eval/2%2B3
http://192.168.0.100:4042/eval/function twice(n) { return n * 2; }
http://192.168.0.100:4042/eval/twice(33)
http://192.168.0.100:4042/hello

0 comments:

Post a Comment