From 37f8142c0f4d8b7682674172af93a66092368fc4 Mon Sep 17 00:00:00 2001 From: devmirza121 Date: Mon, 14 Feb 2022 11:02:50 +0300 Subject: [PATCH] API's Modifications 1.3 --- lib/api/api_client.dart | 7 +++---- lib/classes/consts.dart | 2 +- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/lib/api/api_client.dart b/lib/api/api_client.dart index 6c10bc0..f6d65ea 100644 --- a/lib/api/api_client.dart +++ b/lib/api/api_client.dart @@ -68,12 +68,12 @@ class ApiClient { var response = await postJsonForResponse(url, jsonObject, token: token, queryParameters: queryParameters, headers: _headers, retryTimes: retryTimes); try { if (!kReleaseMode) { - print("res:"+response.body); + print("res:" + response.body); } var jsonData = jsonDecode(response.body); return factoryConstructor(jsonData); } catch (ex) { - print("exception:"+response.body); + print("exception:" + response.body); throw APIException(APIException.BAD_RESPONSE_FORMAT, arguments: ex); } } @@ -109,10 +109,9 @@ class ApiClient { } var response = await _post(Uri.parse(url), body: requestBody, headers: _headers).timeout(Duration(seconds: 100)); if (!kReleaseMode) { - print("Url:$url"); print("body:$requestBody"); - print("res: "+ response.body); + print("res: " + response.body); } if (response.statusCode >= 200 && response.statusCode < 500) { return response; diff --git a/lib/classes/consts.dart b/lib/classes/consts.dart index 046538a..0615648 100644 --- a/lib/classes/consts.dart +++ b/lib/classes/consts.dart @@ -1,5 +1,5 @@ class ApiConsts { - //static String baseUrl = "http://10.200.204.20:2801/"; // Local server + // static String baseUrl = "http://10.200.204.20:2801/"; // Local server static String baseUrl = "https://mdlaboratories.com"; // production server static String baseUrlServices = baseUrl + "/mc/"; // production server // static String baseUrlServices = "https://api.cssynapses.com/tangheem/"; // Live server