You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am working on a project that uses REST API to manage WordPress sites.
I kept getting empty response from REST API calls (for instance: curl --user "username:password" localhost:8070/wp-json/wp/v2/posts). After debugging for several hours I found out that the REST API wp-json endpoint won't be available till permalinks got configured.
I can't find anything related to this step in the REST API documentation. Should we add this to the docs?
The text was updated successfully, but these errors were encountered:
You shouldn't assume that Permalinks are configured on a site, and should use the HTTP Header to discover the endpoint, for example:
Thank you for the response.
That curl command was just an example, I do have HTTP Header attached when calling REST API in my dev/production sites.
And my point is: exactly because user shouldn't assume permalinks are configured on a site, the REST API documentation should alert user that -- if the REST API isn't working for your website, double check if permalinks are configured
I am working on a project that uses REST API to manage WordPress sites.
I kept getting empty response from REST API calls (for instance:
curl --user "username:password" localhost:8070/wp-json/wp/v2/posts
). After debugging for several hours I found out that the REST APIwp-json
endpoint won't be available till permalinks got configured.I can't find anything related to this step in the REST API documentation. Should we add this to the docs?
The text was updated successfully, but these errors were encountered: