如何在Delphi中为伪浏览器启用cookie?

发布于 2024-08-16 06:06:02 字数 270 浏览 2 评论 0原文

我正在测试 Marco Cantu 的 Delphi 2009 手册中的一个应用程序。这个应用程序称为 AnonAjax(第 200 页),具有一些有趣的功能,可以识别网页中的某些元素并列出它们。该应用程序使用匿名方法和内部 Indy HTTP 客户端组件来访问给定的 URL。作为此应用程序功能的一部分,它会加载列出的第一张图像。这很好,但是对于使用 cookie 的网页,它无法正确加载图像。我尝试过 AllowCookies=true 但它不起作用。如何为此应用程序启用 cookie?

I was testing an app from Marco Cantu's Delphi 2009 Handbook. This app, called AnonAjax (page 200), has some interesting features to recognize certain elements from a Web page and list them. This app uses anonymous methods with an internal Indy HTTP client component used to access to a given URL. As part of this app's functionality, it loads the first image listed. That's great, but with a Web page using cookies it does not load the image properly. I've tried with AllowCookies=true but it does not work. How can I enable cookies for this app?

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

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

发布评论

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

评论(2

撧情箌佬 2024-08-23 06:06:02

您可以将 cookie 管理器(indy 组件)附加到 indy http 客户端组件。

you can attach a cookie manager (indy component) to the indy http client component.

飘然心甜 2024-08-23 06:06:02

Indy 10 的 cookie 管理目前正在进行重大重写,以解决其存在的许多问题。您可能会遇到这样的情况:您使用的 Indy 版本要么错误地拒绝服务器的 cookie,要么没有正确地将它们发送回服务器。不幸的是,对于新的 cookie 管理代码何时可供公众使用,我没有确切的预计时间,但已经非常接近了,如果时间允许的话,可能会在本月底。

Indy 10's cookie management is currently undergoing a major rewrite to address many issues that it has. It is likely that you are encountering a situation where the version of Indy you are using is either rejecting the server's cookies incorrectly, or is not sending them back to the server correctly. Unfortunately, I do not have an exact ETA as to when the new cookie management code will be ready for public use, but it is very close, possibly by the end of this month if time permits.

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