def _process_req_body(self, body):
    """Process the body of the HTTP request.

    If the body is valid JSON, return the JSON as a dict.
    Else, convert the key=value format to a dict and return that.

    Args:
      body: The body of the HTTP request.
    """
    try:
      return json.loads(body)
    except ValueError:
      return urlparse.parse_qs(body, keep_blank_values=True)
Process the body of the HTTP request.

    If the body is valid JSON, return the JSON as a dict.
    Else, convert the key=value format to a dict and return that.

    Args:
      body: The body of the HTTP request.