[#boost-urls-url_view_base-encoded_target]
= xref:boost.adoc[boost]::xref:boost/urls.adoc[urls]::xref:boost/urls/url_view_base.adoc[url&lowbar;view&lowbar;base]::encoded&lowbar;target
:relfileprefix: ../../../
:mrdocs:

Return the target

== Synopsis

Declared in `&lt;https://www.github.com/boostorg/url/blob/develop/include/boost/url/url_view_base.hpp#Lundefined[boost&sol;url&sol;url&lowbar;view&lowbar;base&period;hpp]&gt;`

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
xref:boost/urls/pct_string_view.adoc[pct&lowbar;string&lowbar;view]
encoded&lowbar;target() const noexcept;
----

== Description

This function returns the target, which is the portion of the url that includes only the path and query&period; The returned string may contain percent escapes&period;

== Example

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

Constant&period;

== Exception Safety

Throws nothing&period;

== Specification

* https://datatracker.ietf.org/doc/html/rfc3986#section-3.3[3&period;3&period; Path (rfc3986)]
* https://datatracker.ietf.org/doc/html/rfc3986#section-3.4[3&period;4&period; Query (rfc3986)]

== Return Value

The target portion of the url&period;

== See Also

xref:boost/urls/url_view_base/encoded_origin.adoc[`encoded&lowbar;origin`], xref:boost/urls/url_view_base/encoded_resource.adoc[`encoded&lowbar;resource`]&period;


[.small]#Created with https://www.mrdocs.com[MrDocs]#
