【发布时间】:2010-12-06 08:43:48
【问题描述】:
我正在运行一个 mod_python 服务器,其中 index.py 旨在处理传入的请求。
在 index.py 中,如果我设计这样的东西来处理表单并获取表单中的详细信息:
<form enctype="multipart/form-data" action="func" method="post">
<p>Input file:<input type="file" name="request"></p>
<p><input type="submit" name="press" value="submit"></p>
并从这样的表单中获取详细信息(注意上面的操作“func”)
def func(req):
message = []
f = req.form.getfirst('request')
它在浏览器中运行良好。我可以上传一个文件,它的内容可以在服务器端检索。
但是,我想通过 curl 的 POST 发送数据。在这种情况下,我认为,如果我可以从请求对象本身获取 POST 数据,则服务器上的
【问题讨论】:
标签: python http-post mod-python