:relfileprefix: ../../../
[#5BDA19BF404CE73E170208103DB34028833BFEBA]

= Function url_view_base::encoded_password

pass:v,q[Return the password]


== Synopsis

Declared in header `</boost/url/url_view_base.hpp#L936[boost/url/url_view_base.hpp,window=blank_]>`

[source,cpp,subs="verbatim,macros,-callouts"]
----
xref:boost/urls/pct_string_view.adoc[pct_string_view]
encoded_password() const noexcept;
----

== Description

pass:v,q[This function returns the password portion] pass:v,q[of the userinfo as a percent-encoded string.]

=== Example
[,cpp]
----
assert( url_view( "http://jane%2Ddoe:pass@example.com" ).encoded_password() == "pass" );
----

=== Complexity
pass:v,q[Constant.]

=== Exception Safety
pass:v,q[Throws nothing.]

=== BNF
[,cpp]
----
userinfo    = user [ ":" [ password ] ]

user        = *( unreserved / pct-encoded / sub-delims )
password    = *( unreserved / pct-encoded / sub-delims / ":" )
----

=== Specification

* link:https://datatracker.ietf.org/doc/html/rfc3986#section-3.2.1[3.2.1. User Information (rfc3986)]



== Return Value

* `pct_string_view` 




