URL of the Container in which to create a new Resource.
The SolidDataset to save to a new Resource in the given Container.
The Access Grant that would allow the Agent/Application to perform this operation.
Optional parameter options.fetch
: An alternative fetch
function to make the HTTP request, compatible with the browser-native fetch API.
A Promise resolving to a SolidDataset containing the saved data. The Promise rejects if the save failed.
Given a SolidDataset, store it in a Solid Pod as a new Resource inside a Container.
The Container at the given URL should already exist; if it does not, you can initialise it first using createContainerAt, or directly save the SolidDataset at the desired location using resource.saveSolidDatasetAt.
This function is primarily useful if the current user has not been granted access to change existing files in a Container, but is allowed to add new files; in other words, they have been granted Append, but not Write access to a Container. This is useful in situations where someone wants to allow others to, for example, send notifications to their Pod, but not to view or delete existing notifications. You can pass a suggestion for the new Resource's name, but the server may decide to give it another name — for example, if a Resource with that name already exists inside the given Container. If the user does have access to write directly to a given location, resource.saveSolidDatasetAt will do the job just fine, and does not require the parent Container to exist in advance.