来自控制台应用程序的 HTTP Post C#

发布于 2024-12-18 20:20:55 字数 101 浏览 3 评论 0原文

我有一个包含文本框和按钮的网站,当在文本框中输入内容并单击按钮时,该网站将重定向到另一个网站。

我的问题是如何使用控制台应用程序获取重定向的 URL,以及如何传递文本框值。

I have web site that contains textbox and button, when enter something in the textbox and click the button the site redirect to another one.

My question is how to get the redirected URL using console application , and how to pass the textbox value.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(3

南风起 2024-12-25 20:20:55

MSDN 上的这篇文章介绍了如何使用 HttpWebRequest 发布数据。将属性 HttpWebRequest.AllowAutoRedirect 设置为 false 并处理 < a href="http://msdn.microsoft.com/en-us/library/system.net.httpwebrequest.getresponse.aspx" rel="nofollow">GetResponse 和 GetResponseStream

This article on MSDN describe how to post data using HttpWebRequest. Set property HttpWebRequest.AllowAutoRedirect false and process GetResponse and GetResponseStream

伴我心暖 2024-12-25 20:20:55

您可能需要一个代理来捕获响应,然后您可以从该代理进行重定向。尝试使用 burpsuite 它是一个代理,可以让你做到这一点。

You probably would need a proxy to trap the response and then you can redirect from that proxy. Try using burpsuite it is a proxy which will allow you to do this.

往日情怀 2024-12-25 20:20:55

据我了解,您需要定义服务
将收到一个值并且将
返回网址。该服务将从以下位置调用
网站或控制台应用程序。
您可以使用 wcf 、旧的 asmx

值可以作为参数传递给您的 web 方法。

As I understand you need to define service
that will receive a value and will
return URL . The service will be called from
the web site or console application.
You can use wcf , old asmx

The value can be passed as parameter to your web method .

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文