Bonjour, j'essai de poster un fichier sur un serveur en https mais je n'y arrive pas. J'ai chercher sur internet et dans la faq mais je n'y arrive pas.
Voici mon boute de code..
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25 var Fs : TFileStream; begin Fs := TFileStream.Create('c:\example.fdp',fmCreate); With IdSSLIOHandlerSocketOpenSSL1 do Begin //SSLOptions.RootCertFile := 'RootCert.cer'; //SSLOptions.CertFile := 'Cert.cer'; Port := 443; end; with IdHTTP1 do try Request.Username := 'USER'; Request.Password := 'PASS'; try Post('https://...',Fs); except On e : Exception do MessageDlg(Format('Erreur : %s',[e.Message]), mtInformation, [mbOK], 0); end; finally Free; end;
Partager