optionally accept an object as the `url`