wsgidav.util.to_bytes

wsgidav.util.to_bytes(s, encoding='utf8')[source]

Convert a text string (unicode) to bytestring (str on Py2 and bytes on Py3).