declineFriendRequest static method
Declines a friend relationship with the target user. The user must be on your incoming friend request list, though no error will occur if they are not.
Implementation
static Future<BooleanResponse> declineFriendRequest (
HttpClient client,
String membershipId,
) async {
final Map<String, dynamic> params = Map<String, dynamic>();
final String _membershipId = '$membershipId';
final HttpClientConfig config = HttpClientConfig('POST', '/Social/Friends/Requests/Decline/$_membershipId/', params);
config.bodyContentType = null;
final HttpResponse response = await client.request(config);
if(response.statusCode == 200) {
return BooleanResponse.asyncFromJson(response.mappedBody);
}
throw Exception(response.mappedBody);
}