API's Modifications 1.3

fatima
devmirza121 3 years ago
parent 3df3a48d14
commit 37f8142c0f

@ -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;

@ -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

Loading…
Cancel
Save