code: def get_resource_data(incoming_request):
      
      content_type = incoming_request.headers['Content-type'].split(';')[0]
      if ('Content-type' not in incoming_request.headers or
              content_type in JSON_CONTENT_TYPES):
          return incoming_request.json
      elif content_type in HTML_CONTENT_TYPES:
          if not incoming_request.form:
              raise InvalidAPIUsage(400)
          return incoming_request.form
      else:
          # HTTP 415: Unsupported Media Type
          raise InvalidAPIUsage(
              415,
              UNSUPPORTED_CONTENT_TYPE_MESSAGE.format(
                  types=incoming_request.headers['Content-type']))
docs: Return the data from the incoming *request* based on the
      Content-type.