Hello! Help, please send a GET to this data: ** & pswd = ** * = 8

And process the data from the server

 <data status="ok" summa="-****.**">Баланс = -****.**</data> 

The format of the received XML data.

Checked methods:


Displays error.

  • If the server redirects the client, then the HandleRedirects property of the idHTTP component must be set to TRUE, otherwise our program will crash, catching exception 302, since redirect is disabled by default - Vfvtnjd
  • How to use SSL request? do not tell me? - Arsen
  • By the way I forgot to write, I set the HandleRedirects value to true - Arsen
  • What do you call SSL request? Any request that starts on http s and is with SSL - vdk company

1 answer 1

Since the address is https :, you need to add components to work with SSL. And the answer is treated as a regular line.

That is, approximately it will look like this:


The variable S will be your answer.

  • one
    First, we need two components from the indy package, namely TIdHTTP (Indy Clients) and TIdSSLIOHandlerSocketOpenSSL (Indy I / O Handlers). If you create components at run-time, then do not forget to connect the IdSSL, IdSSLOpenSSL modules to Uses. IdHTTP1.IOHandler: = IdSSLIOHandlerSo cketOpenSSL1; // this line does not need comments - vdk company
  • one
    Secondly, we need the Openssl library. Only two of the whole set: libeay32.dll and ssleay32.dll. Therefore, you can download the lite version. According to the library's documentation, you need to drop it into the Windows system catalog (system32 folder), but I keep them in the project folder and recommend keeping them there. Well, the final part of this "difficult" work will be successful code execution: var html: String; begin html: = idHTTP1.Get ('site address '); ShowMessage (html); end; - vdk company 5:41 pm
  • savro Thank you very much you helped me a lot! - Arsen