Created
January 23, 2019 17:27
-
-
Save prakhar21/11521aa2a9f363a57e63994674c14fbe to your computer and use it in GitHub Desktop.
Calling Flask API using Python
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import requests | |
import json | |
ENDPOINT = 'http://localhost:5555/predict' | |
response = requests.post(ENDPOINT, data=json.dumps(data), headers={'content-type': 'application/json'}) | |
print (r.status_code) | |
print (r.json()) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment