[#boost-urls-url_view_base-encoded_origin] = xref:boost.adoc[boost]::xref:boost/urls.adoc[urls]::xref:boost/urls/url_view_base.adoc[url_view_base]::encoded_origin :relfileprefix: ../../../ :mrdocs: Return the origin == Synopsis Declared in `<https://www.github.com/boostorg/url/blob/develop/include/boost/url/url_view_base.hpp#L2337[boost/url/url_view_base.hpp]>` [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- xref:boost/urls/pct_string_view.adoc[pct_string_view] encoded_origin() const noexcept; ---- == 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 [,cpp] ---- 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. == Return Value The origin portion of the url. == See Also xref:boost/urls/url_view_base/encoded_resource.adoc[`encoded_resource`], xref:boost/urls/url_view_base/encoded_target.adoc[`encoded_target`]. [.small]#Created with https://www.mrdocs.com[MrDocs]#