weblib.http¶
Serialize dict or sequence of two-element items into string suitable for sending in Cookie http header.
-
weblib.http.normalize_http_values(items, charset='utf-8', ignore_classes=None)[source]¶ 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.