Follow

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use
Contact

Which API URL Do We Use For Live Flutter App

While developing my flutter App, I used this IP address (http://192.168.60.97/myappapi) to connect to my backend as I was using Apache (Wamp) server installed on my laptop. I got the IP address by entering IPConfig on CMD.

I want to get the App online and I have moved the backend to my web host online. Can I use my website address (https://mywebsite/myappapi) as the API URL?

 class API{
   static const hostConnect = "http://192.168.60.97/myappapi";
   static const uploadFolderURL = "$hostConnect/uploads/";
   static const loginAPIURL = "$hostConnect/apis/login";
   static const updateUserProfileUri = "$hostConnect/edit-profile";
   static const userProfileDataURL = "$hostConnect/profile-data";
}

MEDevel.com: Open-source for Healthcare and Education

Collecting and validating open-source software for healthcare, education, enterprise, development, medical imaging, medical records, and digital pathology.

Visit Medevel

>Solution :

Yes for sure you can use any URL that is online. You just need to update the value of hostConnect and create a new build to test and deploy.

class API{
   static const hostConnect = "https://mywebsite/myappapi";
   static const uploadFolderURL = "$hostConnect/uploads/";
   static const loginAPIURL = "$hostConnect/apis/login";
   static const updateUserProfileUri = "$hostConnect/edit-profile";
   static const userProfileDataURL = "$hostConnect/profile-data";
}
Add a comment

Leave a Reply

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use

Discover more from Dev solutions

Subscribe now to keep reading and get access to the full archive.

Continue reading