Hi.
As of Wappler 5.3.1, when creating a an API server action, it can be consumed using either GET or POST HTTP methods.
But there is no way to identify or restrict if the API is a GET or POST type.
This feature has been briefly discussed years ago, from what I recollect. So creating this post since I could not find any.
The idea is that instead of having EXECUTE node, there could be different NODEs, 1 each for HTTP method - GET, POST, PUT, PATCH, DELETE etc.
Above such nodes would be a GLOBAL node, which could include common initial steps like authentication etc. It could also be just called EXECUTE as to not confuse with the Globals section.
For existing SAs, I see two ways to update:
- Keep current steps in execute/global, so no changes needed.
- Show a prompt to select which HTTP method to update to. Then, any common steps could be manually moved to execute/global node.
Two more points to consider:
- HTML Form element does not support other HTTP methods except GET and POST. So this request would cater more to APIs being created for consumption outside Wappler. But it will still help merge separate SAs for getting data to view (via SC, GET) and editing data in DB (via Form, POST).
- This would probably also ignite the discussion around copying steps across SAs to merge different SAs used specifically for view, edit, delete etc. Maybe something that could be considered as well after this is implemented.
I don’t have the designing skills of @nickneustroev, so just in writing.
Hope this makes sense to be implemented as the next evolution of API/SAs in Wappler.
Last updated: