Skip to content

Instantly share code, notes, and snippets.

@prakhar21
Created January 23, 2019 17:27
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save prakhar21/11521aa2a9f363a57e63994674c14fbe to your computer and use it in GitHub Desktop.
Save prakhar21/11521aa2a9f363a57e63994674c14fbe to your computer and use it in GitHub Desktop.
Calling Flask API using Python
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