Guardati l'utilizzo di async/await. Qui una guida utile: https://www.html.it/pag/69778/funzio...on-asyncawait/
Regole del Forum