Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add heuristic to determine resource type #160

Merged
merged 7 commits into from
Jun 9, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 26 additions & 0 deletions main/resource-access.bs
Original file line number Diff line number Diff line change
Expand Up @@ -130,6 +130,32 @@ Note:
Servers that wish to disable URI re-use may want to use the `410` status
code.

### Resource type heuristics ### {#resource-type-heuristics}

When creating new resources, servers can determine an effective request URI's
type by examining the URI path ending ([[#uri-slash-semantics]]).

Clients who want to assign a URI for their resource, MUST use PUT and PATCH
requests. Servers MAY allow clients to suggest the URI for a resource created
through POST, using the HTTP `Slug` header as defined in [[!RFC5023]].

Clients who want the server to determine the URI for their resource, MUST use
the POST request.

Servers MUST allow creating new resources with a POST request to URI path
ending `/`. Servers MUST create a resource with URI path ending `/{id}` in
container `/`. Servers MUST create a container with URI path ending `/{id}/`
in container `/` for requests including the HTTP `Link` header with
`rel="type"` targeting a valid LDP container type. Servers MUST handle
subsequent requests to the newly created container's URI as if it is a valid
LDP container type by including it the HTTP response's `Link` header.

Clients who want to create hierarchical containers MUST use PUT and PATCH
requests.

[[Source](https://github.com/solid/specification/pull/160#issuecomment-636822687)].


## Auxiliary Resources ## {#rm}

### Background and Need ### {#ar-need}
Expand Down