boost::urls::params_encoded_view

Non-owning encoded query parameter view

Synopsis

Declared in <boost/url/params_encoded_view.hpp>
class params_encoded_view
    : public params_encoded_base

Description

This read-only range exposes the raw percent-encoded key/value pairs stored in a query string. It does not copy the underlying buffer; callers must ensure the referenced character storage outlives the view.

Example

url_view u( "?first=John&last=Doe" ); params_encoded_view p = u.encoded_params();

Iteration yields param_pct_view values, so encoded strings and escape validation are preserved for callers that want exact bytes.

Iterator Invalidation

Changes to the underlying character buffer can invalidate iterators which reference it.

Base Classes

Name Description
params_encoded_basePercent-encoded query helper base

Types

NameDescription
iterator A Bidirectional iterator to a query parameter
const_iterator A Bidirectional iterator to a query parameter
const_reference The reference type
difference_type A signed integer type used to represent differences.
reference The reference type
size_type An unsigned integer type to represent sizes.
value_type The value type

Member Functions

NameDescription
params_encoded_view [constructor]Constructor
operator= Assignment
begin Return an iterator to the beginning
buffer Return the query corresponding to these params
contains Return true if a matching key exists
count Return the number of matching keys
empty Return true if there are no params
end Return an iterator to the end
find Find a matching key
find_last Find a matching key
get_or Return the value for a key or a fallback
size Return the number of params
operator params_view Conversion

Static Member Functions

NameDescription
max_size Return the maximum number of characters possible

Friends

|===
Name Description
parse_query Parse a string and return an encoded params view
params_encoded_ref Mutable encoded query parameter proxy
params_view Non-owning decoded query parameter view
url_view_base Common functionality for containers