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

Rename "mp-action" to "action" #32

Closed
aaronpk opened this issue Jul 5, 2016 · 4 comments
Closed

Rename "mp-action" to "action" #32

aaronpk opened this issue Jul 5, 2016 · 4 comments

Comments

@aaronpk
Copy link
Member

aaronpk commented Jul 5, 2016

Now that only JSON requests are supported for updates, we don't need to namespace the name of the parameter by prefixing mp- like we would with form-encoded requests. In JSON format, all the properties of the object being updated are specified in a nested object, so there is no ambiguity about whether an un-namespaced parameter would be part of the post.

e.g., change

{
  "mp-action": "update",
  "url": "http://example.com/post/1",
  "replace": {
    "content": ["hello moon"]
  }
}

to

{
  "action": "update",
  "url": "http://example.com/post/1",
  "replace": {
    "content": ["hello moon"]
  }
}

I would appreciate feedback from anyone who has implemented updates for a micropub client or server. cc @barryf @myfreeweb

@bear
Copy link

bear commented Jul 5, 2016

That matches the internal view of a micropub event for my framework so I'm +1 to that change

@voxpelli
Copy link

voxpelli commented Jul 5, 2016

I can make that work with my micropub endpoint so I'm +1 as well

@barryf
Copy link
Contributor

barryf commented Jul 6, 2016

👍 Makes sense. I'm still working on my client and it was no effort to change.

aaronpk added a commit that referenced this issue Jul 6, 2016
* Clarified requirement of supporting file uploads directly or supporting a Media Endpoint (#29)
* Updated indiewebcamp.com references to indieweb.org due to redirects
* Rename `mp-action` to `action` since updates are only JSON requests (#32)
@aaronpk
Copy link
Member Author

aaronpk commented Jul 6, 2016

Thanks! This has been done in the latest draft.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants