Better handling json decode error
The decoding of the JSON string in the return request API object is handled after test for response errors. Only bodies that look like a JSON is decoded and an error is raised is the decosing fails
The decoding of the JSON string in the return request API object is handled after test for response errors. Only bodies that look like a JSON is decoded and an error is raised is the decosing fails