Hello nginx-lua folks,
I'd like to capture the output of a remote REST API call and set the result in an nginx variable.
I have a Lua module:function which talks to the API and retrieves the
content correctly, but it seems I can't call it from a set_by_lua
block, as the necessary socket I/O code (tcp()) is disabled in
'set_by_lua*'.
Is there a way to do this? Maybe not with 'set_by_lua', but is there some
mechanism whereby I can get Lua to retrieve a value and set it as an
nginx variable?
Seems like a fairly reasonable thing to want to do, but I could be missing something obvious :-)
Thanks for your help,
Igor