URL POST parameters



我想用C#制作一个程序,它可以在网站上进行登录和操作。我正在使用Fiddler来查看我应该使用哪个URL。

因此,在Fiddler中,我写道:

https://landfill.bugzilla.org/bugzilla-tip/post_bug.cgi?Bugzilla_login=mymail@hotmail.com&Bugzilla_password=mypassword&product=WorldControl&version=1.0&component=WeatherControl&rep_platform=All&op_sys=All&priority=P2&bug_severity=normal&target_milestone=World 202.0&bug_status=CONFIRMED&assigned_to=mymail@hotmail.com&short_desc=bla

我用POST发送。我收到一条消息说:"你确定你无论如何都要提交这些更改吗?这可能会导致意想不到的结果。"

然后,有一个按钮,上面写着"确认更改"。结果html页面中的代码为:

<form name="check" id="check" method="post" action="post_bug.cgi">
  <input type="hidden" name="product"
         value="WorldControl">
  <input type="hidden" name="version"
         value="1.0">
  <input type="hidden" name="component"
         value="WeatherControl">
  <input type="hidden" name="rep_platform"
         value="All">
  <input type="hidden" name="op_sys"
         value="All">
  <input type="hidden" name="priority"
         value="P2">
  <input type="hidden" name="bug_severity"
         value="normal">
  <input type="hidden" name="target_milestone"
         value="World 2.0">
  <input type="hidden" name="bug_status"
         value="CONFIRMED">
  <input type="hidden" name="assigned_to"
         value="mymail&#64;hotmail.com">
  <input type="hidden" name="short_desc"
         value="bla">
  <input type="hidden" name="token"
         value="aGipS2Hfim">
<input type="submit" id="confirm" value="Confirm Changes">

我应该在Fiddler或浏览器中写什么作为URL来点击这个确认按钮?

您应该将POST数据提交到URLhttps://landfill.bugzilla.org/bugzilla-tip/post_bug.cgi。

POST数据应如下所示:

版本=1.2&组件=WeatherControl和。。。。etc

不要忘记对POST数据进行编码,并将内容类型设置为"application/x-www-form-urlencoded"

UPDATE:当您收到带有确认按钮的第一个答案时,将其解析为DOM并再次提交到相同的URL。这应该与您单击确认按钮时的行为相同

问题是参数不应该在URL中。这不是GET方法。

最新更新