Return the target

Synopsis

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

pct_string_view
encoded_target() const noexcept;

Description

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

Example

assert( url_view( "http://www.example.com/index.html?query#frag" ).encoded_target() == "/index.html?query" );

Complexity

Constant.

Exception Safety

Throws nothing.

Return Value

  • pct_string_view