Fix for python 3.

I was getting an error: "TypeError: POST data should be bytes or an iterable of bytes. It cannot be str". Python 3.3.