![]() |
Home | Libraries | People | FAQ | More |
Remove the password.
url_base& remove_password();
This function removes the password from the userinfo if a password exists. If there is no userinfo or no authority, the call has no effect.
The interpretation of the userinfo as individual user and password components is scheme-dependent. Transmitting passwords in URLs is deprecated.
assert( [link url.ref.boost__urls__url_base.url `url`]( "http://user:pass@example.com" ).[link url.ref.boost__urls__url_base.remove_password `remove_password`]().[link url.ref.boost__urls__url_base.authority `authority`]().[link url.ref.boost__urls__url_base.buffer `buffer`]() == "user@example.com" );
this->[link url.ref.boost__urls__url_base.has_password `has_password`]() == false && this->[link url.ref.boost__urls__url_base.encoded_password `encoded_password`]().[link url.ref.boost__urls__pct_string_view.empty `empty`]() == true
Linear in this->size()
.
Throws nothing.
[link url.ref.boost__urls__url_base.userinfo `userinfo`] = [ [ [link url.ref.boost__urls__url_base.user `user`] ] [ ':' [link url.ref.boost__urls__url_base.password `password`] ] ] [link url.ref.boost__urls__url_base.user `user`] = *( unreserved / pct-encoded / sub-delims ) [link url.ref.boost__urls__url_base.password `password`] = *( unreserved / pct-encoded / sub-delims / ":" )
set_encoded_password
, set_encoded_user
, set_password
, set_user
.