Added ability to expect a json response