handle both get/delete and put/push