Move variables inside the request method