use IdCookieManager
cookie:string;
IdCookieManager: TIdCookieManager;
idhttp.CookieManager:=IdCookieManager;
for i := 0 to IdCookieManager.CookieCollection.Count - 1 do
begin
cookie:=Trim(IdCookieManager.CookieCollection.Items.CookieText);
cookie:=Copy(cookie,1,Pos(';',Cookie));
end;
idhttp.Request.CustomHeaders.Text:= ('Cookie: '+ copy(Cookie ,1,length(Cookie)-1));