Indy Components - failing to compile

Dave_B_C
Dave_B_C used Ask the Experts™
on
I have just started to use the Indy components in Delphi 7. However, the relevant code below fails with an undeclared identifier for ExtraHeaders..? Am I missing a uses clause or something?

Dave

----------------------------------------------------------
unit SiteRoutines;

interface

uses
  Dialogs, Classes, SiteCommon;

function GetNewSessionID() : NewSessionIDResult; forward;
function DoSessionLogin(User,Pass,SessionID : String) : ErrResult; forward;
function GetPage(URL,SessionID : String) : PageFetchResult; forward;

implementation

uses
  IdBaseComponent, IdComponent, IdTCPConnection,
  IdTCPClient, IdHTTP, IdGlobal;

function GetNewSessionID() : NewSessionIDResult;
const
  S1 = 'SiteToken=';
  S2 = '; path=/';
var
  myHTTP : TidHTTP;
begin
  Result.Error := FALSE;
  Result.ErrNo := 0;

  try
    myHTTP := TidHTTP.Create(nil);
    myHTTP.Host := HOST;
    myHTTP.Get('/');
    Result.SessionID := myHTTP.Response.ExtraHeaders.Values['Set-Cookie']; // fails here
  finally
    myHTTP.Free;
  end;
Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
I think it's CustomHeaders and not ExtraHeaders

Author

Commented:
The program certainly compiles using CustomHeaders, but doesn't do what I want.. Probably my inexperience.. Is there a web site that details how to use the Indy components?
download the help file from the web site.

as far as I know, ExtraHeaders is a property only for the idMessage (for emails).

Check RawHeaders and see if that's what you want?
Amazon Web Services

Are you thinking about creating an Amazon Web Services account for your business? Not sure where to start? In this course you’ll get an overview of the history of AWS and take a tour of their user interface.

Author

Commented:
That did the biz! You are the man! Thanks.

Just for future reference, which site are the help files on? WWW.Indy.com is a car lot(!), and on a Google search www.nevrona.com looked promising but only had FAQS to download..?

Cheers,

Dave
dGet it from here http://www.nevrona.com/indy/dowload/90.html

Go to the bottom of the page and select to download either in WinHelp or HTMLHelp

Author

Commented:
Thanks a lot...!

Dave

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial