Re: Conditional HTTP requests in read/write Linked Data

Thanks Ryan.

On Mon, Feb 12, 2024 at 7:52 PM Shaw, Ryan <ryanshaw@unc.edu> wrote:
>
>
> > On Feb 9, 2024, at 5:46 PM, Martynas Jusevičius <martynas@atomgraph.com> wrote:
> >
> > Are you using conditional requests
> > with your Linked Data?
>
> We use weak ETags for our top-level graph resource to implement versioning:
>
> ```
> $ curl -s -I https://data.perio.do/dataset.json
> HTTP/2 200
> content-type: application/json
> content-disposition: attachment; filename="periodo-dataset.json"
> etag: W/"periodo-dataset-version-246"
> ```
>
> ```
> $ curl -s -I -H 'If-None-Match: W/"periodo-dataset-version-246"' https://data.perio.do/dataset.json
> HTTP/2 304
> content-disposition: attachment; filename="periodo-dataset.json"
> etag: W/"periodo-dataset-version-246"
> ```
>
> ```
> $ curl -s -I -H 'If-None-Match: W/"periodo-dataset-version-245"' https://data.perio.do/dataset.json
> HTTP/2 200
> content-type: application/json
> content-disposition: attachment; filename="periodo-dataset.json”
> etag: W/"periodo-dataset-version-246"
> ```
>
> We do not rely on ETags for updates, but instead just try to apply the patch to the current dataset and handle failure if necessary.

That's interesting. How do you detect failure to begin with?

Partial updates is actually what I was getting to, as I want to
implement GSP PATCH with If-Match precondition validation.

Received on Monday, 12 February 2024 19:48:24 UTC