Best approach to manage subdomains dynamically in a Qt-based mobile app
-
wrote on 24 Jan 2025, 05:49 last edited by ellen
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!
-
-
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!
@ellen Not sure what the problem is. The user selects a domain and your app uses that domain to communicate via QNetwork AccessManager.
-
wrote on 27 Feb 2025, 19:57 last edited byThis post is deleted!
-
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!
wrote on 28 Feb 2025, 08:37 last edited byThis post is deleted! -
Using
QNetworkRequestFactory
and changing itsbaseUrl
in once place might help.