I meet a big problem. I have a PHP application (symfony), and an API only callable with curl.
The frontend (client side) sends many requests with ajax et the server side call the API. And, when I abort the request Ajax the process in server side is not spotted.
Bellow the schema :
[Front] <=> request ajax 1 <=> [server side] <=> call Api in curl
[Front] <=> request ajax 2 <=> [server side] <=> call Api in curl
...
[Front] <=> request ajax n <=> [server side] <=> call Api in curl
The request ajax n will have to wait for all the previous answers before having an answer.
Problematic, I must keep the call with curl.
Question 1 - With API rest instead of server side, I will have the same problem? Question 2 - Multithread PHP, Daemon, is a good solution for this problem ?