Set the scheme
The scheme is set to the specified string, which must contain a valid scheme without any trailing colon (':'). Note that schemes are case-insensitive, and the canonical form is lowercased.
assert( url( "http://www.example.com" ).set_scheme( "https" ).scheme_id() == scheme::https );
Calls to allocate may throw. Exceptions thrown on invalid input.
scheme = ALPHA *( ALPHA / DIGIT / "+" / "-" / "." )
Name | Thrown on |
---|---|
`s` |
contains an invalid scheme. |
Name | Description |
---|---|
s | The scheme to set. |