📜  烧瓶发送 post 请求 - Python 代码示例

📅  最后修改于: 2022-03-11 14:45:56.592000             🧑  作者: Mango

代码示例1
#make a POST request
import requests
dictToSend = {'question':'what is the answer?'}
res = requests.post('http://localhost:5000/tests/endpoint', json=dictToSend)
print 'response from server:',res.text
dictFromServer = res.json()