Sometimes you need something faster than the amazing Wappler devs can arrange. So to answer my own topic (How to send a response with custom header) I created a module that allows me to set headers in a response created by a server action.
To quote @JonL: Drop these two babies in /extensions/server_connect/modules
It was definitely not on my to-do list to make this yesterday, but I’m glad to better understand how this works.
It’s opening my eyes to how any server connect can be relatively easily expanded like this.
I could simply copy the code from the Wappler devs out of core.js - but I couldn’t find their .hjson equivalent. After making the .hjson with their code, it simply worked just like the original component. Easy to take it from there…
Very excited for custom components, then I think I can do everything I want with Wappler.
PS Any tips on how to debug these things efficiently? I’ve been putting some extra comments into the request like: .send(data + 'the headers are not set') but I’d rather do the equivalent to console.log… also I don’t think this will work well if I’m not actually working with a ‘response’ addon.