Skip to content

Latest commit

 

History

History
39 lines (29 loc) · 630 Bytes

README.md

File metadata and controls

39 lines (29 loc) · 630 Bytes

Query Strings

A quick guide on query strings.

Setting a Value to a Key

To set a value to a specific key in the query string,

/resource?key=value
key = request.args.get('key')

Setting a List Value to a Key

Set a list of values to a specific key in the query string. You can retrieve this using a specific.

/resource?list[]=1&list[]=2
list_ = request.args.getlist('list[]')

Setting a Boolean Value to a Key

Set a boolean value to a specific key in the query string.

/resource?boolean
boolean = 'boolean' in request.args