Return the authority

Synopsis

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

authority_view
authority() const noexcept;

Description

This function returns the authority as an authority_view.

Example

authority_view a = url_view( "https://www.example.com:8080/index.htm" ).authority();

Complexity

Constant.

Exception Safety

Throws nothing.

BNF

authority   = [ userinfo "@" ] host [ ":" port ]

Specification

Return Value

  • authority_view