gohttpserver
gohttpserver copied to clipboard
脚本上传,返回成功但是看不到文件(手动上传没问题)
很简单的测试脚本
import pycurl
c = pycurl.Curl() c.setopt(c.URL, 'http://10.251.110.38:8000')
c.setopt(c.HTTPPOST, [ ('test.png', ( # upload the contents of this file c.FORM_FILE, file, )), ])
c.perform() c.close()
返回
{"destination":"upload","success":true}