#1 2025-08-12 00:30:18

firstfriday
Member
Registered: 2015-07-21
Posts: 27

Connect to a https Server

hi, I have a problem with secTLSSelfSigned.

The client returns always an error code 666.

FHTTPClient.TLS.Enabled:=true;
FHTTPClient.TLS.IgnoreCertificateErrors:=true;
StatusCode := FHTTPClient.Request(FBaseURL, 'POST',10 ,'Content-Type: application/json'#13#10 +  'Accept: application/json',RequestBody);
// StatusCode  always 666

Server ist created like this:

HttpServer := TRestHttpServer.Create('8080', [RestServer], '+', useBidirSocket, 32, secTLSSelfSigned );

what am I doing wrong?

Offline

#2 2025-08-12 16:49:51

ab
Administrator
From: France
Registered: 2010-06-21
Posts: 15,148
Website

Re: Connect to a https Server

The tests with secTLSSelfSigned do pass here.

There is not enough information in your code.
Use a gist or a download link please to put some reproducible example.

Can you try to debug a little and find out where the client fails?

Offline

Board footer

Powered by FluxBB