Best approach to manage subdomains dynamically in a Qt-based mobile app
-
Hi everyone,
I'm currently working on a Qt-based mobile application that needs to handle multiple subdomains dynamically based on user preferences. The app fetches data from different subdomains of our main domain, e.g., user1.example.com, user2.example.com, etc.
Currently, I'm using Q Network Access Manager to make API calls, but I'm wondering if there's a more efficient way to dynamically switch subdomains without affecting the app's performance. Has anyone dealt with a similar scenario?
Would appreciate any insights or recommendations on how to structure the API requests efficiently and whether implementing a caching layer within the app makes sense.
Thanks in advance!
-
-
I already had a similar case with Qt and QNetworkAccessManager. To manage the subdomains dynamically, I used a QNetworkRequest with a URL configured on the fly, and it works well without any noticeable impact on performance. Adding a cache layer (e.g. QNetworkDiskCache) can also improve efficiency if the data does not change too often.