Fix: https url
This commit is contained in:
@@ -10,8 +10,7 @@ Future<List<GymItem>> getItems(BuildContext context,
|
||||
{String searchText = '', String categoryId = ''}) async {
|
||||
final token = context.read<GymLinkProvider>().token;
|
||||
if (token != '') {
|
||||
final Uri url =
|
||||
Uri.http('gymlink.freemyip.com:8080', 'api/product/get-list');
|
||||
final Uri url = Uri.https('gymlink.freemyip.com', 'api/product/get-list');
|
||||
try {
|
||||
final response = await http.post(url,
|
||||
headers: {
|
||||
@@ -48,7 +47,7 @@ Future<List<GymItem>> getItemsByIds(
|
||||
return [];
|
||||
}
|
||||
final Uri url =
|
||||
Uri.http('gymlink.freemyip.com:8080', 'api/product/get-products');
|
||||
Uri.https('gymlink.freemyip.com', 'api/product/get-products');
|
||||
try {
|
||||
final response = await http.post(url,
|
||||
headers: {
|
||||
@@ -76,8 +75,8 @@ Future<List<GymItem>> getItemsByIds(
|
||||
Future<List<GymCategory>> getCategories(BuildContext context) async {
|
||||
final token = context.read<GymLinkProvider>().token;
|
||||
if (token != '') {
|
||||
final Uri url = Uri.http(
|
||||
'gymlink.freemyip.com:8080', 'api/category/get-internal-categories');
|
||||
final Uri url = Uri.https(
|
||||
'gymlink.freemyip.com', 'api/category/get-internal-categories');
|
||||
try {
|
||||
final response = await http.get(url, headers: {
|
||||
'Authorization': 'Bearer $token',
|
||||
|
||||
Reference in New Issue
Block a user