In Python3 response.content is binary and throws a TypeError when passed...

... to json.loads(). This minor code tweak makes it safe for both Python2 and Python3