In python 3.x, the POST parameters must be bytes, not str.
[ci skip]
This reverts commit 7d2b4aa047.
7d2b4aa047