def decode_message(message_type, encoded_message, **kwargs):
  message = message_type()
  builder = URLEncodedRequestBuilder(message, **kwargs)
  arguments = cgi.parse_qs(encoded_message, keep_blank_values=True)
  for argument, values in sorted(arguments.iteritems()):
    added = builder.add_parameter(argument, values)
    # Save off any unknown values, so they're still accessible.
    if not added:
      message.set_unrecognized_field(argument, values, messages.Variant.STRING)
  message.check_initialized()
  return message
Decode urlencoded content to message.
dataset/ETHPy150Open AppScale/appscale/AppServer/lib/protorpc/protorpc/protourlencode.py/decode_message