Support URL objects instead of just URL strings