Delphi Examples

ChilkatHOMEASPVisual BasicVB.NETC#Visual C++CMFCDelphiFoxProJavaPerlPHPPythonRubySQL ServerVBScript

Delphi Examples

Bounced Mail
Character Encoding
Digital Certificates
Digital Signatures
Email
FTP
HTML-to-XML
HTTP
IMAP
Encryption
MHT / HTML Email
RSA Encryption
S/MIME
Socket
Spider
String
Tar
Upload
XML
XMP
Zip Compression

More Examples...
Byte Array
Email Object
POP3
SMTP
RSS
Atom
Self-Extractor
Service
PPMD
Deflate
DH Key Exchange
DSA

Unreleased...
Bzip2
LZW
Bz2
Icon

Type Conversion

 

Article: Understanding COM References in Delphi

HTTPS GET with Client Certificate

Simple HTTPS GET request to download the HTML of a web page. Uses a client digital certificate for the SSL connection.

Download Chilkat HTTP ActiveX

uses
    Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
    Dialogs, StdCtrls,
    CHILKATHTTPLib_TLB,
    CHILKATCERTIFICATELib_TLB,
    OleCtrls;

...

procedure TForm1.Button1Click(Sender: TObject);
var
http: TChilkatHttp;
success: Integer;
certStore: CHILKATCERTIFICATELib_TLB.IChilkatCertStore;
cert: CHILKATHTTPLib_TLB.IChilkatCert;
html: String;

begin
http := TChilkatHttp.Create(Self);

//  Any string unlocks the component for the 1st 30-days.
success := http.UnlockComponent('Anything for 30-day trial');
if (success <> 1) then
  begin
    ShowMessage(http.LastErrorText);

  end;

//  Create an instance of a certificate store object, load a PFX file,
//  locate the certificate we need, and use it for signing.
//  (a PFX file may contain more than one certificate.)
certStore := CoChilkatCertStore.Create();
//  The 1st argument is the filename, the 2nd arg is the
//  PFX file's password:
success := certStore.LoadPfxFile('tagtooga_secret.pfx','secret');
if (success <> 1) then
  begin
    ShowMessage(certStore.LastErrorText);

  end;

cert := certStore.FindCertBySubjectE('admin@tagtooga.com') As CHILKATHTTPLib_TLB.IChilkatCert;
if (cert = nil ) then
  begin
    ShowMessage(certStore.LastErrorText);

  end;

http.SetSslClientCert(cert As CHILKATHTTPLib_TLB.IChilkatCert);

//  Send the HTTP GET and return the content in a string.

html := http.QuickGetStr('https://www.paypal.com/');

Memo1.Lines.Add(http.LastErrorText);
end;

 

Need a specific example? Send a request to support@chilkatsoft.com

© 2000-2007 Chilkat Software, Inc. All Rights Reserved.

Mail Component · .NET Email Component · XML Parser