【Py】Python的调包日常——网络类

作为服务端

flask

作为用户端

post

import requests
import json
url = "http://website"
headers = {"Content-Type":"application/json"}
pyload = {"content":3}
response = requests.post(url, data=json.dumps(pyload), headers=headers).text
posted @ 2020-03-09 15:40  Ryan_W  阅读(283)  评论(0编辑  收藏  举报