Generic method to do a request, Iterate endpoints, no changes in client API