getlist(key, type=None, as_bytes=False)¶
Return the list of items for a given key. If that key is not in the
Headers, the return value will be an empty list. Just as
getlist()accepts a type parameter. All items will be converted with the callable defined there.
New in version 0.9: Added support for as_bytes.
- key – The key to be looked up.
- type – A callable that is used to cast the value in the
Headers. If a
ValueErroris raised by this callable the value will be removed from the list.
- as_bytes – return bytes instead of unicode strings.
listof all the values for the key.