boost::urls::static_url::static_url

Constructor

Synopsis

Declared in <include/boost/url/static_url.hpp>

explicit
static_url(core::string_view s);

Description

This function constructs a url from the string `s`, which must contain a valid URI or relative-ref or else an exception is thrown. The new url retains ownership by making a copy of the passed string.

static_url< 1024 > u( "https://www.example.com" ); return static_url( parse_uri_reference( s ).value() ); this->buffer().data() != s.data()

Linear in `s.size()`.

Exceptions thrown on invalid input.

URI = scheme ":" hier-part [ "?" query ] [ "#" fragment ] relative-ref = relative-part [ "?" query ] [ "#" fragment ]
  • 4.1. URI Reference
  • Exceptions

    Name Thrown on
    The

    input does not contain a valid url.

    Parameters

    Name Description
    s

    The string to parse.

    Created with MrDocs