rejectRequest method
Future<void>
rejectRequest(
- CapabilityLink capabilityLink,
- String rejectionReason,
- PrivateKey withPrivateKey
Implementation
Future<void> rejectRequest(
CapabilityLink capabilityLink,
String rejectionReason,
PrivateKey withPrivateKey,
) async {
final content = {'rejectionReason': rejectionReason};
final resp = await postAuth(
'/request/${capabilityLink.value}/reject',
json.encode(content),
withPrivateKey,
);
if (resp.statusCode != HttpStatus.ok) {
return Future.error(HttpResponseError(resp.statusCode, resp.body));
}
}