:relfileprefix: ../../../
[#boost-urls-url_view_base-encoded_resource]

= xref:boost.adoc[pass:[boost]]::xref:boost/urls.adoc[pass:[urls]]::xref:boost/urls/url_view_base.adoc[pass:[url_view_base]]::encoded_resource


Return the resource


== Synopsis

Declared in header `<https://www.github.com/boostorg/url/blob/develop/include/boost/url/url_view_base.hpp#L2299[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_resource() const noexcept;
----

== Description


This function returns the resource, which
is the portion of the url that includes
only the path, query, and fragment.
The returned string may contain
percent escapes.

=== Example
[,cpp]
----
assert( url_view( "http://www.example.com/index.html?query#frag" ).encoded_resource() == "/index.html?query#frag" );
----

=== Complexity

Constant.

=== Exception Safety

Throws nothing.

=== Specification

* link:https://datatracker.ietf.org/doc/html/rfc3986#section-3.3[3.3. Path (rfc3986)]

* link:https://datatracker.ietf.org/doc/html/rfc3986#section-3.4[3.4. Query (rfc3986)]








== See Also


xref:boost/urls/url_view_base/encoded_origin.adoc[encoded_origin]
,
xref:boost/urls/url_view_base/encoded_target.adoc[encoded_target]
.



