【发布时间】:2014-11-27 13:39:07
【问题描述】:
我正在尝试运行此代码:
var
objHttp: TIdHTTP;
...
objHttp.HandleRedirects := True;
objHttp.AllowCookies := True;
sGet := objHttp.Get('http://www.bmf.com.br/arquivos1/arquivos_ipn.asp?idioma=pt-BR&status=ativo');
...
我得到了这个:
<code>
<html>
<head>
<title>Request Rejected</title>
</head>
<body>The requested URL was rejected. Please consult with your administrator.<br>Your support ID is: 109088803187671168</body>
</html>
</code>
知道为什么吗?
【问题讨论】:
-
将
objHttp.Request.UserAgent设置为一些网络浏览器用户代理。该服务器不喜欢 Indy 的默认服务器。 -
谢谢,这解决了问题!