move common request logic into a single parent class

This significantly reduces generated code size while retaining the API.