Set the scheme
This function sets the scheme to the specified known urls::scheme id, which may not be scheme::unknown or else an exception is thrown. If the id is scheme::none , this function behaves as if remove_scheme were called.
assert( url( "http://example.com/echo.cgi" ).set_scheme_id( scheme::wss ).buffer() == "wss://example.com/echo.cgi" );
Calls to allocate may throw. Exceptions thrown on invalid input.
Name | Thrown on |
---|---|
The |
scheme is invalid. |
Name | Description |
---|---|
id | The scheme to set. |