Use set_url_scheme. Thanks to @ericandrewlewis for the heads up.