fixed getResponseAsJSON closure
changed http client method to protected