A web service receives HTTP GET requests where the URL may include a query string, which is the part after the first question mark '?'. Your task is to parse the query parameters and return a mapping of keys to their values.
Parse the query string according to the following rules:
- Key-Value Extraction:
- For each
key=valuepair, includekey: valuein the result.- For example, the query string
"year=100&type=action"should produce{"year": "100", "type": "action"}.
- For example, the query string
- For each
Ask AI Assistant

Ask AI Assistant
Ask me anything about this coding question!
Stdout
-