Hello dear friends! I am new to Grav CMS and would be happy if you support me.
How to create a PHP plugin that takes raw text from a POST request and returns the processed text?
For example, if I want to create a PHP plugin and use it as an API to convert text to uppercase.
This is how I want:
- There is an input field and a submit button.
- Enter "hello world" in the input field, click "Submit".
- There is an Ajax data exchange between the client and my plugin. Ajax. As a result, "HELLO WORLD" is returned in the input field.
For me it is important that the text processing is on the server. And it is important that js can make a POST request and receive a response asynchronously.