encoded_origin

Return the origin

Synopsis

pct_string_view
encoded_origin() const noexcept;

Declared in file <include/boost/url/url_view_base.hpp> on line 2267

Defined in file <src/url_view_base.cpp> on line 608

Description

If an authority is present, this function returns the scheme and authority portion of the url. Otherwise, an empty string is returned. The returned string may contain percent escapes.

Example

assert( url_view( "http://www.example.com:8080/index.htm?text=none#h1" ).encoded_origin() == "http://www.example.com:8080" );

Complexity

Constant.

Exception Safety

Throws nothing.