Jump to content

mdsantos

Members
  • Content Count

    3
  • Joined

  • Last visited

Posts posted by mdsantos


  1. It's not the case. The json is small, just 237 chars.

     

    Also tested with postman in the same machine, it took 1 sec to reply. Restarted the machine, and... the problem was gone, strange.

     

    Even so the Indy upgrade was not a smooth ride. We follow the documentation, step by step:

     

    - Automated Uninstall script for XE4 Clean_X4.cmd

    - removing the packages from the IDE

    - Build the indy project (C++ Builder) with the Fullc_XE4.bat

    image.thumb.png.d0413cb9f39a7787db8046090cfa5d51.png

    - Setting the lib paths Lib\core, lib\system, lib\protocolos

    image.thumb.png.704a2059dc4b1c7be92da590bf633e99.png

    image.thumb.png.b49f2db7a299f6f4d9da364f51851d81.png

     

    but I got error installing the new packages. "Impossible to locate the specific module".

     

    image.thumb.png.f50f8d163a4be52670a18936649056d0.png

     

     

     

     

     

     

     

    image.png


  2. Hi,

     

    I have some legacy application written in C++ Builder XE4. Our client asked us to change some Webservices call to https TLS 1.2. And then problems started. We tried to use Indy HTTP to do this, but only TLS 1.0. was available, after a lot of digging and try outs, we were able to update Indy Components in XE4 (using the documentation available at https://github.com/IndySockets/Indy/wiki/Updating-Indy) and now we are able to do the call using TLS 1.2 

     

    The problem now it's that the idHTTP post request is very slow to receive an response (it takes about a minute or more), using Postman it's less than a 1 sec.

     

    Here is the code snippet:

     

        TIdSSLIOHandlerSocketOpenSSL *SSLHandler = new TIdSSLIOHandlerSocketOpenSSL(NULL);


        TIdHTTP *IdHTTP1 = new TIdHTTP(NULL);

        SSLHandler->SSLOptions->Method = sslvTLSv1_2;      //(we add to force this, otherwise we got the "Error connecting with SSL. error 1409442E:SSL routine:ssl3_read_bytes:tlsv1 alert protocol version")

        IdHTTP1->IOHandler = SSLHandler;

        IdHTTP1->Request->CustomHeaders->AddValue("X_API_KEY", "somevalue");
        IdHTTP1->Request->ContentType = "application/json";

        //IdHTTP1->Request->ContentType = tipo->Text;
        UnicodeString json = "[JSON DATA]"; // Replace with your JSON data
        TStringStream *ss = new TStringStream(json);
        UnicodeString response = IdHTTP1->Post("https://TheServiceURL", ss);   // ---> THIS TAKES ABOUT 1 MINUTE TO EXECUTE
        ShowMessage("Response Rest: " + response);  

     

     

    Some help would be appreciated. Thank you.

     

     

     

×