Deduplicate request code