Extract abstract class for API request and base