【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

猜你喜欢

转载自www.cnblogs.com/Ryan16231112/p/12449062.html