首页 > 代码库 > What should I do about “302 Found” exceptions when downloading with Indy?
What should I do about “302 Found” exceptions when downloading with Indy?
Set the TIdHTTP.HandleRedirects
property to True. It is False by default.
function FetchUrl(const url: string): string;
var
idhttp : TIdHTTP;
begin
idhttp := TIdHTTP.Create(nil);
try
idhttp.HandleRedirects := True;
Result := idhttp.Get(url);
finally
idhttp.Free;
end;
end;
声明:以上内容来自用户投稿及互联网公开渠道收集整理发布,本网站不拥有所有权,未作人工编辑处理,也不承担相关法律责任,若内容有误或涉及侵权可进行投诉: 投诉/举报 工作人员会在5个工作日内联系你,一经查实,本站将立刻删除涉嫌侵权内容。