A little late, but I was looking for an "easy" way to download a file from a webserver using HTTPS and ran into this topic.
Under more recent macOS versions (at least as of Mojave),
fphttpclient will not work.
Apple does not seem to like the OpenSSL library (default macOS setup!):
Invalid dylib load. Clients should not load the unversioned libcrypto dylib as it does not have a stable ABI.
As an alternative for macOS users, use the unit "
ns_url_request" by Phil Hess (can be found
here -
Phil's Mac related page).
This does not require any extra libraries (beyond what comes with macOS).
A quick (and sloppy) function pulling in HTTPS content as a string:
uses ... ns_url_request ... // Note: "ns_url_request" uses Phil's "NSHelpers" unit.
...
function TForm1.GetURLContent(aURL:string):string;
var
HTTP: TNSHTTPSendAndReceive;
begin
HTTP := TNSHTTPSendAndReceive.Create;
HTTP.Method := 'GET';
HTTP.Address := aURL;
HTTP.SendAndReceive(Result);
HTTP.Free;
end;