Fix rest module to reset request variables in the before hook
Merge pull request #1232 from brutuscat/reset-rest-variables

Fix rest module to reset request variables in the before hook