![]() |
Home | Libraries | People | FAQ | More |
A non-owning reference to a valid authority.
Defined in header <boost/url/authority_view.hpp>
class authority_view
Name |
Description |
---|---|
authority_view [constructor] |
Constructor. |
Return the complete authority. |
|
Return the result of comparing this with another authority. |
|
Return a pointer to the first character. |
|
Return true if the authority is empty. |
|
Return the host. |
|
Return the host. |
|
Return the host and port. |
|
Return the host name. |
|
Return the password. |
|
Return the user. |
|
Return the userinfo. |
|
Return true if a password is present. |
|
Return true if a port is present. |
|
Return true if a userinfo is present. |
|
Return the host. |
|
Return the host. |
|
Return the host IPv4 address. |
|
Return the host IPv6 address. |
|
Return the host IPvFuture address. |
|
Return the host name. |
|
Return the host type. |
|
Assignment. |
|
Return the password. |
|
Return the port. |
|
Return the port. |
|
Return the number of characters in the authority. |
|
Return the user. |
|
Return the userinfo. |
|
~authority_view [destructor] |
Destructor. |
Name |
Description |
---|---|
Return the result of comparing two authorities The authorities are compared component by component as if they were first normalized. |
|
Return the result of comparing two authorities The authorities are compared component by component as if they were first normalized. |
|
Return the result of comparing two authorities The authorities are compared component by component as if they were first normalized. |
|
Return the result of comparing two authorities The authorities are compared component by component as if they were first normalized. |
|
Return the result of comparing two authorities The authorities are compared component by component as if they were first normalized. |
|
Return the result of comparing two authorities The authorities are compared component by component as if they were first normalized. |
|
Format the encoded authority to the output stream. |
Objects of this type represent valid authority strings constructed from a parsed, external character buffer whose storage is managed by the caller. That is, it acts like a core::string_view in terms of ownership. The caller is responsible for ensuring that the lifetime of the underlying character buffer extends until it is no longer referenced.
Construction from a string parses the input as an authority and throws an exception on error. Upon success, the constructed object points to the passed character buffer; ownership is not transferred.
[link url.ref.boost__urls__authority_view.authority_view `authority_view`] a( "user:pass@www.example.com:8080" );
The parsing function parse_authority
returns a result
containing either a valid authority_view
upon succcess, otherwise
it contain an error. The error can be converted to an exception by the caller
if desired:
system::result< authority_view > rv = [link url.ref.boost__urls__parse_authority `parse_authority`]( "user:pass@www.example.com:8080" );
authority = [ [link url.ref.boost__urls__authority_view.userinfo `userinfo`] "@" ] [link url.ref.boost__urls__authority_view.host `host`] [ ":" [link url.ref.boost__urls__authority_view.port `port`] ] [link url.ref.boost__urls__authority_view.userinfo `userinfo`] = [link url.ref.boost__urls__authority_view.user `user`] [ ":" [ [link url.ref.boost__urls__authority_view.password `password`] ] ] [link url.ref.boost__urls__authority_view.user `user`] = *( unreserved / pct-encoded / sub-delims ) [link url.ref.boost__urls__authority_view.password `password`] = *( unreserved / pct-encoded / sub-delims / ":" ) [link url.ref.boost__urls__authority_view.host `host`] = IP-literal / IPv4address / reg-[link url.ref.boost__urls__host_type `name`] [link url.ref.boost__urls__authority_view.port `port`] = *DIGIT
Convenience header <boost/url.hpp>