Fix no handling of empty string response

Making a request to certain endpoints doesn't return JSON, but we still attempt to parse all responses as JSON. This results in parse failures, specifically for the delete_record method which returns a 200 with an empty string as content.