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 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. |
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 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.
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:
result< url_view > rv = parse_uri_reference( "https://www.example.com/index.htm?text=none#a1" );
URI-reference = URI / relative-ref URI = scheme ":" hier-part [ "?" query ] [ "#" fragment ] relative-ref = relative-part [ "?" query ] [ "#" fragment ]
parse_absolute_uri
,
parse_origin_form
,
parse_relative_ref
,
parse_uri
,
parse_uri_reference
.
Convenience header <boost/url.hpp>