refactor($http): avoid using closure vars in serverRequest fn

Closes #10361