added proxy support, and wire logging of rest/json api calls (exception of post data)