Adds support for proxies

Now the rest task supports proxies, using the standard java system properties
Adds unit test to verify that the proxy gets set