Need help on both request & responce transformation
Closed this issue · 1 comments
Hello,
I have a rather special case: it is necessary to send a http request with a json post header from client to eel, transform it, forward it to server, wait for a response (json), transform it & return it to the client. Could you guide me how to do it best with eel ? Thanks
What you are asking should be possible with existing EEL functionality. You can use the built-in header() function to access JSON in incoming http header values in your transformation. You can also make a call to a server from an eel transformation using the built-in curl() function and wait for a response. You can find detailed information about all the built-in functions here: https://github.com/Comcast/eel/blob/master/doc/functions.md. Finally, you can use eel in sync mode with /v1/sync/events as described in https://github.com/Comcast/eel/blob/master/README.md if you want to give a synchronous response to the original event source (rather than forwarding events asynchronously). If I understand your request correctly, you should be able to assemble a handler that combines the things I outline above to solve your problem.