You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Jan 17, 2023. It is now read-only.
I'd like to send updates to the server. I'm thinking we keep /data/{id} for the place to set the JSON, but we add a PATCH/POST method (some libraries might make PATCH hard, I'm not sure, and we're just pretending to have a diff document, so admitting that it's just an ad hoc POST seems okay). Also sdk Request doesn't seem to support PATCH.
I propose POST /data/{id} would:
Return 404 if the resource doesn't exist (or maybe something else – this might be somewhat common depending on how we code things, and I know ops hates expected 4xx errors – maybe 412 Precondition Failed would be better)
Return 200 OK if it goes okay, or maybe 204
Takes a JSON document request body. Mimetype we could make up (we would be somewhat compelled to do so for PATCH), or just call it JSON.
The JSON contains properties, each of which overwrites the old property. We will use null in place of actually deleting properties (it's equivalent in the client code). Only for the .clips property, we will look more deeply, adding properties from that object to the existing properties. A null value (e.g., {clips: {"93a938f": null}}) will imply the clip should be deleted.
The text was updated successfully, but these errors were encountered:
I'd like to send updates to the server. I'm thinking we keep
/data/{id}
for the place to set the JSON, but we add a PATCH/POST method (some libraries might make PATCH hard, I'm not sure, and we're just pretending to have a diff document, so admitting that it's just an ad hoc POST seems okay). Also sdk Request doesn't seem to support PATCH.I propose
POST /data/{id}
would:The JSON contains properties, each of which overwrites the old property. We will use
null
in place of actually deleting properties (it's equivalent in the client code). Only for the.clips
property, we will look more deeply, adding properties from that object to the existing properties. A null value (e.g.,{clips: {"93a938f": null}}
) will imply the clip should be deleted.The text was updated successfully, but these errors were encountered: