WP-API / docs-v2

Documentation for version 2 of the API
http://v2.wp-api.org
58 stars 76 forks source link

Update post curl doc example didn't work #147

Closed zfaworks closed 7 years ago

zfaworks commented 8 years ago

I tried to update a post using the doc here: http://v2.wp-api.org/reference/posts/

The example request for "Update a post" didn't work for my instance with Version 2.0-beta13: $ curl -X POST <base URL>/wp-json/wp/v2/posts/<id> -d '{"title":"My New Title"}' Also the post example request is incomplete.

This did work for me: $ curl -X POST <base URL>/wp-json/wp/v2/posts/<id> -d "content:test"

kadamwhite commented 7 years ago

@zfaworks Did you ever get this sorted out? Curl will require authentication, without knowing more about your issue it's hard to say whether something else is at work. I'm closing this out on suspicion that authentication is the culprit, which we're already in progress documenting better.

kadamwhite commented 7 years ago

Reading your post again it's clear authentication is not the problem but again without knowing more details it's hard to diagnose. Let us know in the WordPress support forums if you're still having trouble!