WordPress 4.7 REST API Example Request does not work

I’m using successfully the WordPress 4.7 REST API in this way:

curl -H "Authorization: Basic mykey" -X POST --data-urlencode "title=Something" www.myhost.com/wp-json/wp/v2/posts/770

The example in the new docs suggests:

curl -X POST http://demo.wp-api.org/wp-json -d '{"title":"My New Title"}'

which obvious is a wrong endpoint. Adapting to

curl -H "Authorization: Basic mykey" -X POST www.myhost.com/wp-json/wp/v2/posts/770 --data-urlencode '{"title":"My New Title"}'

does not change the title but simply returns the post as JSON

Any idea?

Read more here: WordPress 4.7 REST API Example Request does not work

Leave a Reply

Your email address will not be published. Required fields are marked *