如何使用asyncio.start_server将文件上传到服务器? 我通过此命令使用CURL发送了一个文件:
curl -i -X POST -H "Content-Type: multipart/form-data" -F "data=@server.py" http://localhost:8888
StremReader的结果是:
POST / HTTP/1.1\r\nUser-Agent: curl/7.35.0\r\nHost: localhost:8888\r\nAccept: */*\r\nContent-Length: 7673\r\nExpect: 100-continue\r\nContent-Type: multipart/form-data; boundary=------------------------ea4b0f3e04ac89ad\r\n\r\n
我的源代码:https://github.com/carlosmaniero/asyncio_server/blob/master/server.py。