【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
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