Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

flask sending post request

#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()
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #flask #sending #post #request
ADD COMMENT
Topic
Name
9+5 =