Handle non-JSON response bodies

Previously the Response constructor would blow up if given a non-JSON
response body.  This adds handling for this case.