add unit test for apiProxy middleware
improve variable names in apiProxy
Revert "improve variable names in apiProxy"

This reverts commit 519ee49b2e52ddc7dfed2c30947d883f6ffaa7ad.
Merge pull request #220 from c089/add-test-for-api-proxy-middleware

Add test for api proxy middleware