query_parser 1.0.0+3 query_parser: ^1.0.0+3 copied to clipboard
Parse URL to obtain both the URL path as a String and the QueryString as a Map.
query_parser #
Parse URL to obtain both the URL path as a String and the QueryString as a Map. All it takes is the URL as a positional argument.
Get started #
Initialize the Query parser object with a URL as String parameter. After that you can invoke its methods. It automatically parses the encoded URL strings so that you don't have to on the Parameters Map.
QueryParser query = QueryParser(url);
Example: #
//Parse the query and save it into a variable
QueryParser query = QueryParser('https://localhost:8443/api?request=loginPerson&email=noOne@domain.com&password=superSimple63');
//Returns the URL path
print('Request URL is ${query.urlPath}');
print('With parameters:');
//Returns a Map with all of the recieved parameters
print(query.queryParameters);
Hecho en 🇵🇷 por Radamés J. Valentín Reyes.