import requests

main_url = 'http://127.0.0.1:5000/'
print(requests.get(main_url))
filename = "elon2.jpg"
with open(filename, "rb") as imageFile:


    url = main_url+'image'
    headers = {'Content-Type': 'application/octet-stream'}
    try:
        response = requests.post(url,
                 files=[('image_data',
                         (filename, imageFile, 'image/jpg'))])
        print(response.status_code)
        print(response.json())
    except Exception as e:
        print(e)

    data = response.content

    print(data)


