Factored out request code