shawdown Posted January 15, 2018 Share Posted January 15, 2018 Hello everyone. My project is set to EnableSynchronousOperations set to true. I need to make a request from a json on a remote server, but this call may take some time to get up to 2 minutes. How to capture this json without freezing my application? So while waiting for this json to be captured I can go using the application. Quote Link to comment Share on other sites More sharing options...
Sherzod Posted January 15, 2018 Share Posted January 15, 2018 Hi, Can you explain a little more that you would like to implement ? Quote Link to comment Share on other sites More sharing options...
shawdown Posted January 15, 2018 Author Share Posted January 15, 2018 I'm doing a "chat" messaging system. After the user login I make a request to an http server that only responds if a new message arrives or reaches a time limit of 120 seconds. The problem is that when I make this request unigui is waiting for the response and it is not possible for the user to continue using the application. I would like to know how to run this http request in the background without freezing the application. Because unigui is waiting for the http server response. Sorry if I can not be very clear because I'm using Google Translate. If necessary I can give an example of this situation. Quote Link to comment Share on other sites More sharing options...
Sherzod Posted January 15, 2018 Share Posted January 15, 2018 I would like to know how to run this http request in the background without freezing the application. Because unigui is waiting for the http server response. Have you already made this implementation ? Quote Link to comment Share on other sites More sharing options...
shawdown Posted January 15, 2018 Author Share Posted January 15, 2018 Have you already made this implementation ? Yes, using IdHTTP and TUniTimer. Quote Link to comment Share on other sites More sharing options...
shawdown Posted January 15, 2018 Author Share Posted January 15, 2018 As if it were a separate thread in VCL applications. Quote Link to comment Share on other sites More sharing options...
shawdown Posted January 15, 2018 Author Share Posted January 15, 2018 Any suggestion? Should I disable EnableSynchronousOperations from my project? Quote Link to comment Share on other sites More sharing options...
shawdown Posted January 16, 2018 Author Share Posted January 16, 2018 Problem solved. I got it using jquery and changing the webservice to the idIttpServer of unigui. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.