indieweb / micropub-extensions

Issue tracking for Micropub extensions
https://indieweb.org/Micropub-extensions
11 stars 1 forks source link

Simple update syntax #2

Open aaronpk opened 6 years ago

aaronpk commented 6 years ago

The Micropub spec only allows updates via JSON POST requests, in order to specify whether the update is replacing, adding or removing values in the lists. However, this leaves room for a simpler update syntax for the simple case of replacing values.

For example, a POST request that contains action=update and a url indicates that it is an edit instead of a create request. The remaining POST body parameters will replace any existing values of those properties. Only the fields specified will be changed, no values will be removed.

POST /micropub

action=update
&url=http://example.com/post/1000
&name=Hello+Moon

Note that because there is no way to indicate whether a value should be replaced or added, this is not useful for requests to add tags or add syndication URLs.

manton commented 6 years ago

I like this. Keeps things simple for some common use cases like updating the post's text.