deleteTable method

Future<void> deleteTable(
  1. String tableName
)

Delete a new table from azure storage account

'tableName' is mandatory.

Implementation

Future<void> deleteTable(String tableName) async {
  String path = 'https://${config[accountName]}.table.core.windows.net/Tables(\'$tableName\')';
  var request = http.Request('DELETE', Uri.parse(path));
  request.headers['Accept'] = 'application/json;odata=nometadata';
  request.headers['Content-Type'] = 'application/json';
  _sign4Tables(request);
  var res = await request.send();
  if (res.statusCode == 204) {
    return;
  }
  var message = await res.stream.bytesToString();
  throw AzureStorageException(message, res.statusCode, res.headers);
}