Serialize dict or sequence of two-element items into string suitable for sending in Cookie http header.
normalize_http_values(items, charset='utf-8', ignore_classes=None)¶
Accept sequence of (key, value) paris or dict and convert each value into bytestring.
Unicode is converted into bytestring using charset of previous response (or utf-8, if no requests were performed)
None is converted into empty string.
If ignore_classes is not None and the value is instance of any classes from the ignore_classes then the value is not processed and returned as-is.
Convert unicode into byte-string using detected charset (default or from previous response)
By default, charset from previous response is used to encode unicode into byte-string but you can enforce charset with
Convert sequence of items into bytestring which could be submitted in POST or GET request.
It differs from
urllib.urlencodein that it can process unicode and some special values.
itemscould dict or tuple or list.