WordPress API Endpoint plugin with JSON Request & Response
This plugin wrote based on my exprience working in CalibreWorks as web developer. I got task to create API endpoint to be connected with Android application for client.
After digging to google to find reference and code example, It turns out that creating an endpiont for an API in WordPress is super easy as follow:
- Create a custom rewrite rule as the API Enpoint URL
- Parse the request send to the API Endpoint URL
- Create a handler for the API request such as user authentication, query posts, update posts, etc.
- Send back JSON data response to client application.