This is very, very rough sample code for how to do some Java REST requests. To run this code: 1) Edit Demo.java and set the BASE_URL to your Gallery3 install. 2) Edit USERNAME and PASSWORD as appropriate 3) In a shell, do "sh build.sh" 4) In a shell, do "sh run.sh" Note that there is NO error checking, so if something goes wrong you'll have to debug it.