Skip to content

Instantly share code, notes, and snippets.

@maikwoehl
Created May 20, 2016 00:13
Show Gist options
  • Save maikwoehl/e26b264793a596ba18da739856089ec2 to your computer and use it in GitHub Desktop.
Save maikwoehl/e26b264793a596ba18da739856089ec2 to your computer and use it in GitHub Desktop.
Quick Serializing of GET Query String
# Serializes a GET query string
# Input: key1=value1&key2=value2
# Output: { 'key1': 'value1', 'key2': 'value2' }
def serializeQueryString(query_string):
query = query_string.split("&")
params = {}
for item in params:
params[item.split("=")[0]] = item.split("=")[1]
return params
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment