def parse_response(response):
    """
    parse response and return a dictionary if the content type.
    is json/application.
    :param response: HTTPRequest
    :return dictionary for json content type otherwise response body
    """
    if response.headers.get('Content-Type', JSON_TYPE).startswith(JSON_TYPE):
        return ResponseObject(json.loads(response.body))
    else:
        return response.body