21
我有用于从应用程序发送错误报告到服务器的HTML表单。我需要以编程方式模仿此行为。相应的POST请求(或一系列请求)会是什么样子?如何在POST请求中模仿HTML表单提交?
<form name="bugreport" method="post" enctype="multipart/form-data" action="http://my-server.com/bugreport.php">
<div name="SentData">
<textarea name="logfile" class="UserVisible"></textarea><br>
<textarea name="configfile" class="UserVisible"></textarea><br>
</div>
<textarea name="usercomment" class="invisible"></textarea><br>
<input name="useremail" type="text" class="invisible">
<input class="invisible" type="submit" value="Send">
</form>
谢谢! FireBug真的很有帮助(但事实证明,一旦你知道原理,你就不需要它)。 –
假设服务器**可以**处理它们,那么HTTP **协议** **是否允许**“垃圾数据”用于内容类型的x-www-form-urlencoded?例如。 'logfileblabla&configfile ===== mo + uselo &&& useremail =&=&=&+' – Pacerier
谢谢。这就是我一直在寻找的东西。 – Joey