Implemented `resp.format` by introducing `ifAccepts` function