I have a bunch of web resources. To make my life easier I have made now an additional one which returns aliases for all the endpoints. This is quite handy as I also do have different environments (host names and ports). Now I can curl the resource and copy paste all aliases (like list="curl ...") which works fine. But how can I source the aliases directly? Something like
curl "http://localhost:9999/env" | bash
which btw does not work.
EDIT: sample output
alias topics='curl -X GET "http://localhost:9999/bus/api/v1/topics"'
alias stats='curl -X GET "http://localhost:9999/bus/api/v1/topics+stats"'