Ver Mensaje Individual
  #7  
Antiguo 26-02-2020
Avatar de look
look look is offline
Miembro
 
Registrado: sep 2007
Ubicación: The Shire
Posts: 656
Reputación: 17
look Va camino a la fama
Cita:
Empezado por Neftali [Germán.Estévez] Ver Mensaje
El problema es que a ese código [look] le falta la parte de acceder a una dirección HTTPS.
Para hacerlo (a diferencia d una HTTP) tienes que usar un componente TIdSSLIOHandlerSocket que se "engancha" con el TidHttp y que es el que se encarga de cargar las DLL's para poder usar SSL.
hola, y si utilizamos mejor un NetHTTPClient ???

Código Delphi [-]
function GetJSON(test: string): string;
var
  NetHTTP: TNetHTTPClient;
  lParamList: TStringList;
begin

  lParamList := TStringList.Create;
  lParamList.Add('dummy='+test);
  NetHTTP := TNetHTTPClient.Create(nil);
  try
    Result := NetHTTP.Post('https://........./root/demo/GetJSON.php', lParamList).ContentAsString;
  finally
    NetHTTP.Free;
    lParamList.Free;
  end;

end;
__________________
all your base are belong to us
Responder Con Cita