-
-
Notifications
You must be signed in to change notification settings - Fork 133
Open
Labels
Description
Updating a post seems to not work,
The issue is that POST /wp-json/wp/v2/posts/%ID% expects a specific set of arguments and values like:
{"title":"mytitle", "content":"mycontent"}
Instead, the library seems to grab a GET /wp-json/wp/v2/posts/%ID%
which is like so:
{"title":{"rendered":"mytitle"}, "content":{"rendered":"
mycontent
"}}Then feeds it back to POST /wp-json/wp/v2/posts/%ID%
The library should GET /wp-json/wp/v2/posts/%ID%?context=edit
then grab
title->raw
content->raw
excerpt->raw
(etcetera)
and modify those if needed by user of library
then put them for POST /wp-json/wp/v2/posts/%ID%
as
{"titlle":"modified title", "content":"modified content", "excerpt": "modified excerpt"}
Thanks