Parse a URI String into Name-Value Collection

I’ve got the URI like this:

https://google.com.ua/oauth/authorize?client_id=SS&response_type=code&scope=N_FULL&access_type=offline&redirect_uri=http://localhost/Callback

I need a collection with parsed elements:

NAME               VALUE
------------------------
client_id          SS
response_type      code
scope              N_FULL
access_type        offline
redirect_uri       http://localhost/Callback

To be exact, I need a Java equivalent for the C#/.NET HttpUtility.ParseQueryString method.

25 Answers
25

Leave a Comment