I'm trying to do an http request inside an http endpoint but am running into an error:
Error: Can't set headers after they are sent
I've tried deleting msg.headers, msg,statusCode and other items on msg but I always get that error. Looking at the http nodes (not digging into the source code) it appears this should work fine - ie: they don't walk on each other variables - msg.res and msg.req shouldn't be written on - but as I said I haven't yet dug into the source of the respective http nodes recently.
I've tried saving copies of msg.res and msg.req but I get other errors..
Anyone have any guidance on what to try next?