Using Tidhttp and SSL getting a socket error

Giganews Newsgroups
Subject: Using Tidhttp and SSL getting a socket error
Posted by:  Jayc Salter (ja…
Date: Thu, 17 Aug 2006

Hi there

i am working on a little app using Indy components to access a webpage
(after logging into it).
My intention is to eventually download a file from that page.
This is the first time i have worked on something like this so please
excuse any ignorance on my part

i have managed to get the little app to login to a site but when i
attempt to use the same code to get into a secure site i get problems.
(HTTP works HTTPS does not)

the only difference between the code that works and that that doesnt is
that i assign a TIdSSLHandler for the secure site.

i get a "Socket Error # 11004" error when i attempt to post (or get)

I use the following code:

  poststring : TStringList;
  postresult : string;
    poststring := TStringList.Create;
    poststring.Values['username'] := 'SomeUSerName';
    poststring.Values['password'] := 'TheCorrectPassword';

    //This is the additional line of code that is different to the code
that works >>
    IdHTTP1.IOHandler := IdSSLIOHandlerSocketOpenSSL1;

    //I get the error on this line of code >>
    postresult :=
IdHTTP1.Post('', poststring);


Thanks for your help