In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-31 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)06/02 Report--
This article will explain in detail what the basic use of WordPress REST API is, and the content of the article is of high quality, so the editor will share it for you as a reference. I hope you will have a certain understanding of the relevant knowledge after reading this article.
The WordPress system opens REST API by default, that is, except for outputting content in HTML format
You can also output data such as articles / users / comments in JSON format.
The reason why JSON data format response is supported is due to a variety of intelligent terminal devices, such as mobile phones / tablets / televisions / routers / home appliances / toys, etc.
They all have to communicate with the cloud server, and the data needed by the terminal device does not necessarily have to be presented to the user after parsing the HTML through the browser.
Therefore, JSON is usually used for data communication, which is easy to write / read / parse.
If you have deployed WordPress, you can get the data in JSON format through the corresponding link:
Example of link format:
Article list / wp-json/wp/v2/posts
Page list / wp-json/wp/v2/pages
User list / wp-json/wp/v2/users
Replace the sample domain name with your own domain name, and if the page returns a 404 error, you need to set the redirection rule for the WEB proxy server (Nginx).
For a complete resource API link, please visit
Https://developer.wordpress.org/rest-api/reference/
Thus it can be seen that if the website wants to provide data interface services for other devices, it can be used directly without development costs.
If you don't expect your website to open REST API, you can disable this feature by installing the plug-in Disable REST API.
Plug-in address:
Https://wordpress.org/plugins/disable-json-api/
After the installation is enabled, other users do not have access to data except the administrator who has logged in.
To make JSON data easy to read in browsers, you can install related extensions:
Chrome:
Https://chrome.google.com/webstore/detail/json-viewer/aimiinbnnkboelefkjlenlgimcabobli?utm_source=chrome-ntp-icon on the basic use of WordPress REST API to share here, I hope that the above content can be of some help to you, can learn more knowledge. If you think the article is good, you can share it for more people to see.
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.