@staticmethod
def json_or_object(response):
    """
        Returns the content of the response as a dict. If the object
        does not have content, then returns the response itself.
        """
    try:
        return response.json()
    except:
        return response
