unfollowCustomListResponse method

Future<Response> unfollowCustomListResponse(
  1. String sessionToken,
  2. String listId
)
inherited

Endpoint used: DELETE /list/{id}/follow

Makes the user identified by the sessionToken unfollow a custom list identified by it's listId and returns a http response.

Implementation

Future<http.Response> unfollowCustomListResponse(
  String sessionToken,
  String listId,
) async {
  var payload = {
    HttpHeaders.authorizationHeader: 'Bearer $sessionToken',
    HttpHeaders.contentTypeHeader: 'application/json',
  };
  var unencodedPath = '/list/$listId/follow';
  final uri = 'https://$AUTHORITY$unencodedPath';
  return await http.delete(Uri.parse(uri), headers: payload);
}