factors out response rendering into separate method
factors out response rendering into separate method

ResEnv/chain-api,kkleidal/chain-api,kkleidal/chain-api,ResEnv/chain-api,ResEnv/chain-api,ResEnv/chain-api,kkleidal/chain-api,kkleidal/chain-api