refactor(request): externalize state