python http requests 中文

#!/usr/bin/env python
import requests  # pip install requests

r = requests.post(url,
                  data=text.encode('utf-8'),
                  headers={'Content-type': 'text/plain; charset=utf-8'})
print(r.json())

posted on 2017-12-19 19:47  不忘初衷,方能致远  阅读(113)  评论(0)    收藏  举报

导航