code: def parse_response(response):
      
      if response.headers.get('Content-Type', JSON_TYPE).startswith(JSON_TYPE):
          return ResponseObject(json.loads(response.body))
      else:
          return response.body
docs: 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