Boost.URL Logo

PrevUpHomeNext

parse_query_params

Return a query params view from a parsed string, using query-params bnf.

Synopsis

Defined in header <boost/url/params_encoded_view.hpp>

result< params_encoded_view >
parse_query_params(
    string_view s);
Description

This function parses the string and returns the corresponding query params object if the string is valid, otherwise sets the error and returns an empty range. The query string should not include the leading question mark.

BNF
query-params    = query-param *( "&" query-param )
query-param     = key [ "=" value ]

key             = *qpchar
value           = *( qpchar / "=" )
qpchar          = unreserved
                / pct-encoded
                / "!" / "$" / "'" / "(" / ")"
                / "*" / "+" / "," / ";"
                / ":" / "@" / "/" / "?"
Exception Safety

No-throw guarantee.

Return Value

The encoded parameter view, or an error if parsing failed.

Parameters

Name

Description

s

The string to parse

Specification
See Also

params_encoded_view, result.

Convenience header <boost/url.hpp>


PrevUpHomeNext