码迷,mamicode.com
首页 > 其他好文 > 详细

What should I do about “302 Found” exceptions when downloading with Indy?

时间:2014-06-12 14:53:09      阅读:286      评论:0      收藏:0      [点我收藏+]

标签:style   code   http   color   get   strong   

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; 

What should I do about “302 Found” exceptions when downloading with Indy?,布布扣,bubuko.com

What should I do about “302 Found” exceptions when downloading with Indy?

标签:style   code   http   color   get   strong   

原文地址:http://www.cnblogs.com/azhqiang/p/3782040.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!