![]() |
Home | Libraries | People | FAQ | More |
A non-owning reference to a valid URL.
Defined in header <boost/url/url_view.hpp>
class url_view : public url_view_base
Name |
Description |
---|---|
Return the authority. |
|
Return the url string. |
|
Return the result of comparing this with another url. |
|
Return a pointer to the url's character buffer. |
|
Return true if the url is empty. |
|
Return the authority. |
|
Return the fragment. |
|
Return the host. |
|
Return the host. |
|
Return the host and port. |
|
Return the host name. |
|
Return the origin. |
|
Return the query as a container of parameters. |
|
Return the password. |
|
Return the path. |
|
Return the query. |
|
Return the resource. |
|
Return the path as a container of segments. |
|
Return the target. |
|
Return the user. |
|
Return the userinfo. |
|
Return the fragment. |
|
Return true if an authority is present. |
|
Return true if a fragment is present. |
|
Return true if a password is present. |
|
Return true if a port is present. |
|
Return true if a query is present. |
|
Return true a scheme 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. |
|
Return true if the path is absolute. |
|
Assignment. |
|
Return the URL as a core::string_view. |
|
Return the query as a container of parameters. |
|
Return the password. |
|
Return the path. |
|
Return a shared, persistent copy of the url. |
|
Return the port. |
|
Return the port. |
|
Return the query. |
|
Return the scheme. |
|
Return the scheme. |
|
Return the path as a container of segments. |
|
Return the number of characters in the url. |
|
url_view [constructor] |
Constructor. |
Return the user. |
|
Return the userinfo. |
|
~url_view [destructor] |
Destructor. |
Name |
Description |
---|---|
Return the maximum number of characters possible. |
Name |
Description |
---|---|
Objects of this type represent valid URL 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 a URI-reference 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__url_view.url_view `url_view`] u( "https://www.example.com/index.htm?text=none#a1" );
Parsing functions like parse_uri_reference
return a result
containing either a valid url_view
upon succcess, otherwise
they contain an error. The error can be converted to an exception by the
caller if desired:
system::result< url_view > rv = [link url.ref.boost__urls__parse_uri_reference `parse_uri_reference`]( "https://www.example.com/index.htm?text=none#a1" );
URI-reference = URI / relative-[link url.ref.boost__urls__grammar__ref `ref`] URI = [link url.ref.boost__urls__url_view.scheme `scheme`] ":" hier-part [ "?" [link url.ref.boost__urls__url_view.query `query`] ] [ "#" [link url.ref.boost__urls__url_view.fragment `fragment`] ] relative-[link url.ref.boost__urls__grammar__ref `ref`] = relative-part [ "?" [link url.ref.boost__urls__url_view.query `query`] ] [ "#" [link url.ref.boost__urls__url_view.fragment `fragment`] ]
parse_absolute_uri
,
parse_origin_form
,
parse_relative_ref
,
parse_uri
,
parse_uri_reference
.
Convenience header <boost/url.hpp>