Since both the REST API and Headless WordPress applications are now mainstream within the WordPress development economy, it’s likely developers have a standard set of tools they like to use when working on these types of projects.
Yours truly not excepted.
And though I’m not making the case that my set of tools should be the standard, I have a set of tools that I’ve found and consistently use when building headless WordPress applications with a REST API.
Though this isn’t in any particular order, I’ll outline them here, how I use them, and explain how they help with login and authentication, testing custom API endpoints, and reviewing emails sent from the local development environments.
As I’ve continued to work with integration mobile applications with the WordPress REST API, there have been a few instances in which I’ve wanted to inspect, manage, or manipulate incoming REST API Requests.
There’s a number of reasons you may want to manipulate incoming WordPress REST API requests before they actually begin interacting with the core application. In my case, I needed to determine:
which endpoint is being requested,
check whether or not a specific key is being bassed,
return an error if not or proceed with further processing.
But that’s one of many different possibilities available. What I’m more interested in, at least in this article, is showing how to manipulate a request before it’s actually sent to be processed.
With the second-half of the REST API merge confirmation coming to WordPress 4.7, it’s safe to say that there are going to be there clearly be more than one WordPress REST API example made available in the next few months.
Then again, there are examples that already exist because it’s possible to include the REST API in your project as a plugin, but I digress.
One of the neater, smaller examples that I’ve recently come across is by Brian Krogsgard.
Not only does it show a WordPress REST API example, it shows how to use it in the context of a Rect applications.
If you are looking for WordPress guides and unbiased reviews, I recommend checking out WPKube. They also have an exclusive deals section.
Just Getting Started with WordPress? I write a lot about WordPress development but if you're just getting started, I recommend checking out WPBeginner. They have free training videos, glossary, and more.