deleteCustomListResponse method

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

Endpoint used: DELETE /list/{id}

Deletes a list identified by it's listId only if the user identified by the sessionToken is eligible to do so and retuns a http response.

Implementation

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