In [8]:
import requests
with open('README.md', 'r') as f:
files = {'file': f}
r = requests.post("http://localhost:8000/pics",files=files)
s = r.json()
In [9]:
s
Out[9]:
In [10]:
requests.get("http://localhost:8000/pics").json()
Out[10]:
In [ ]: