callProofCallback function
Implementation
Future<void> callProofCallback(String sessionId, Proof proof) async {
try {
final response = await http.post(
Uri.parse('${Constants.DEFAULT_RECLAIM_CALLBACK_URL}$sessionId'),
headers: {'Content-Type': 'application/json'},
body: jsonEncode(proof.toJson()));
final res = json.decode(response.body);
if (response.statusCode != 200) {
throw Exception('Error with sessionId: $sessionId');
}
return res;
} catch (err) {
logger.e(err);
}
}