Skip to content

PATCH to create #231

@michielbdejong

Description

@michielbdejong

NSS and PSS support PATCH to create. This means that if do an inserts-only PATCH to a URL that is a 404, that resource is created on the fly. CSS does not support this.

https://github.com/solid/solid-crud-tests/blob/master/test/surface/create-non-container.test.ts#L167 is the test in the test suite for it.

I found the text "a server creates a resource on HTTP [...] PATCH requests" but I didn't find an explicit statement saying "servers must support PATCH to create".

The old spec said "If the resource doesn't exist, it should be created through an LDP POST or through a PUT." but that's a very old text, predating current NSS behaviour.

I think Solid OS depends on this behaviour, for instance when adding a chat message, if that message happens to be the first message on that day, the document for it gets created on the fly. It's handy. :)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions