Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Google Calendar - Indy IdHTTP + SSL

274 views
Skip to first unread message

hello...@gmail.com

unread,
Aug 2, 2008, 8:01:00 AM8/2/08
to
Hi,
I try to connect to the Google Calendar API.

I found this code from 2006. I put it together and copied there the
SSL dlls, too.

It seems that I get a correct ResponseCode = 200 but after that the
SSLIOHandler does not seem to function.

Should I set any properties on the SSLIOHandlerSocketOpenSSL?

(Indy and thr SSL dlls seem fine as I could read a GMail POP3 account
with them.)

Thank you for your help.

Tibor

============================================

drop a button, a Tidhttp, TIdSSLIOHandlerSocketOpenSSL, and a TMemo on
the
form. Set the IOHandler for IDHTTP to the
IdSSLIOHandlerSocketOpenSSL1.
Then in the button's OnClick event do the following:

procedure TForm1.Button1Click(Sender: TObject);
var
stringStream: TIdStringStream;
postStrings: TidStringList;
postResult: string;
begin
postStrings := TIdStringList.Create;
try
postStrings.LineBreak := '&';
postStrings.Values['Email'] := 'email';
postStrings.Values['Passwd'] := 'passwod';
postStrings.Values['service'] := 'cl';
postStrings.Values['source'] := 'company-program-version';

stringStream := TIdStringStream.Create(postStrings.Text);
try
IdHTTP1.Request.ContentType := 'application/x-www-form-
urlencoded';
postResult := IdHTTP1.Post('https://www.google.com/accounts/
ClientLogin', stringStream);
Memo1.Lines.Add(postResult);
finally
stringStream.Free;
end;
finally
postStrings.Free;
end;
end;

tibi

unread,
Aug 11, 2008, 1:20:13 PM8/11/08
to
The newest Indy10 and openssl dlls solved it.

0 new messages