put static method
Implementation
static put(String path, Object item) async {
final config = CConfig();
try {
var result = await http.put(Uri.parse('${config.serverUrl}$path'),
headers: {
'Content-Type': 'application/json',
'Authorization': 'Bearer ${config.token}'
},
body: jsonEncode(item));
if (result.statusCode == 200) {
return true;
}
} catch (e) {
if (kDebugMode) {
print(e);
}
}
}