Software Engineering in WordPress and Musings on the Deep Life

Tag: WordPress REST API

How To Build Headless WordPress Applications with a REST API

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.

  • MailHog
  • Insomnia
  • JWT Auth

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.

Continue reading

Manipulate Incoming WordPress REST API Requests

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.

Continue reading

WordPress REST API Example (One of Many)

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.

WordPress REST API Example: 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.

Continue reading

© 2023 Tom McFarlin

Theme by Anders NorenUp ↑