简体   繁体   English

HttpWebRequest保持连接并重复使用

[英]HttpWebRequest Keep Connection and Reuse it

So my basic idea is to create emails(yahoo for example) but for this purpose i need to open the connection, pass the captcha and then return it to the same connection so the captcha is still the same. 所以我的基本想法是创建电子邮件(例如,雅虎),但为此目的,我需要打开连接,传递验证码,然后将其返回到相同的连接,以便验证码仍然相同。 I just need to know how to do that. 我只需要知道该怎么做。 I hope you got my question. 希望你能回答我的问题。

A CAPTCHA shouldn't require that the connection is kept alive. 验证码不应要求连接保持活动状态。 It should include some sort of token identifying the challenge in an opaque way - so long as you present that back to the server within the subsequent request, it should be fine. 它应该包括某种令牌,以不透明的方式识别挑战-只要您在后续请求中将其提交回服务器,就可以了。

(As it happens, HttpWebRequest does reuse connections, but that's an implementation detail you don't need to be aware of in most cases.) (碰巧的是, HttpWebRequest 确实重用了连接,但这是大多数情况下您无需了解的实现细节。)

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM