kivyblocks/kivyblocks/uploadfile.py
2019-12-19 11:13:47 +08:00

11 lines
201 B
Python

import requests
url = "http://localhost:8080/uploadfile.dspy"
files = {
"afile":("uploadfile.py",open("uploadfile.py","rb"),"application/python")
}
r = requests.post(url,files=files)
print(r.text)