Do you want the page to show the result of the REST call? If not, then you could process the REST call and corresponding functionality asynchronously using the process queue. That way you will always be able to load the page quickly while the REST call is processed in the background.
Our Dataview loader widget is specifically made for this purpose. This way you can render/show your page and additional elements, like a datagrid based on your rest call, will be loaded when ready.
Check it out at https://marketplace.mendix.com/link/component/50833
You could use a timeout on the request and ask users to try again later, or maybe you can put the part of the page that depends on the request behind the dataview loader widget. This provides a non blocking spinner so if the pages takes too long to load, your users can navigate elsewhere.