11/13/1
This commit is contained in:
@@ -109,7 +109,7 @@ class CameraClassController extends GetxController {
|
||||
await http.MultipartFile.fromPath('image', imageFile.path),
|
||||
); // Add the headers to the request
|
||||
request.headers.addAll({
|
||||
// "Content-Type": "application/x-www-form-urlencoded",
|
||||
"Content-Type": "application/x-www-form-urlencoded",
|
||||
'Authorization':
|
||||
'Basic ${base64Encode(utf8.encode(AppCredintials.basicAuthCredentials))}',
|
||||
});
|
||||
|
||||
@@ -27,8 +27,10 @@ class CRUD {
|
||||
var jsonData = jsonDecode(response.body);
|
||||
if (jsonData['status'] == 'success') {
|
||||
print(jsonData);
|
||||
|
||||
return response.body;
|
||||
}
|
||||
|
||||
return jsonData['status'];
|
||||
}
|
||||
}
|
||||
@@ -78,7 +80,7 @@ class CRUD {
|
||||
jsonData['status'],
|
||||
jsonData['message'],
|
||||
);
|
||||
|
||||
// print(response.body);
|
||||
return response.body;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user