Skip to content

Function: deleteResource

deleteResource(uri, options?): Promise\<DeleteResult>

Deletes a resource on a Pod at a given URL.


Name Type Description
uri string The URI for the resource that should be deleted
options? DatasetRequestOptions Options to provide a fetch function and a local dataset to update.



a DeleteResult


deleteResource will send a request to a Solid Pod using the provided fetch function. A local dataset can also be provided. It will be updated with any new information from the delete.

import { deleteResource } from "@ldo/solid";
import { createDataset } from "@ldo/dataset"
import { fetch } from "@inrupt/solid-client-autn-js";

const localDataset = createDataset();
const result = await deleteResource(
  { fetch, dataset: localDataset },
if (!result.isError) {
  // Do something

Defined in