Revert "Factored out request code"

This reverts commit c0ea6dc68a274466953d21a92e923a11cbd044f1.