Skip to content

Instantly share code, notes, and snippets.

@timelfrink
Last active December 13, 2018 08:19
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 timelfrink/6735e204b3e4c53c96f3a4a9a477f190 to your computer and use it in GitHub Desktop.
Save timelfrink/6735e204b3e4c53c96f3a4a9a477f190 to your computer and use it in GitHub Desktop.
import requests
import json
url = 'http://0.0.0.0:5000/api/'
data = [[14.34, 1.68, 2.7, 25.0, 98.0, 2.8, 1.31, 0.53, 2.7, 13.0, 0.57, 1.96, 660.0]]
j_data = json.dumps(data)
headers = {'content-type': 'application/json', 'Accept-Charset': 'UTF-8'}
r = requests.post(url, data=j_data, headers=headers)
print(r, r.text)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment