Fix ugliness with async checking in router

can we make doGet and doPost share more code and avoid copy pasting?