The urllib library will analyze the query string parameters and allow you to access the parameters of both the list and the map. Use the list if there may be duplicate keys, otherwise the card is quite convenient.
Given this snippet:
String raw = "http://s3.amazonaws.com/?AWSAccessKeyId=123&Policy=456&Signature=789&key=asdasd&Content-Type=text/plain&acl=public-read&success_action_status=201"; Url url = Url.parse(raw); System.out.println(url.query().asMap()); for (KeyValue param : url.query().params()) { System.out.println(param.key() + "=" + param.value()); }
Conclusion:
{Policy=456, success_action_status=201, Signature=789, AWSAccessKeyId=123, acl=public-read, key=asdasd, Content-Type=text/plain} AWSAccessKeyId=123 Policy=456 Signature=789 key=asdasd Content-Type=text/plain acl=public-read success_action_status=201
EricE source share