[#boost-urls-params_encoded_ref]
= xref:boost.adoc[boost]::xref:boost/urls.adoc[urls]::params&lowbar;encoded&lowbar;ref
:relfileprefix: ../../
:mrdocs:


A view representing query parameters in a URL

== Synopsis


Declared in `&lt;https://www.github.com/boostorg/url/blob/develop/include/boost/url/params_encoded_ref.hpp#L73[boost&sol;url&sol;params&lowbar;encoded&lowbar;ref&period;hpp]&gt;`

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
class params&lowbar;encoded&lowbar;ref
    : public xref:boost/urls/params_encoded_base.adoc[params&lowbar;encoded&lowbar;base];
----

== Types

[cols=2]
|===
| Name | Description 

| xref:boost/urls/params_encoded_base/const_iterator.adoc[`const&lowbar;iterator`] 
| A Bidirectional iterator to a query parameter

| xref:boost/urls/params_encoded_base/const_reference.adoc[`const&lowbar;reference`] 
| The reference type

| xref:boost/urls/params_encoded_base/difference_type.adoc[`difference&lowbar;type`] 
| A signed integer type used to represent differences&period;

| xref:boost/urls/params_encoded_base/iterator.adoc[`iterator`] 
| A Bidirectional iterator to a query parameter

| xref:boost/urls/params_encoded_base/reference.adoc[`reference`] 
| The reference type

| xref:boost/urls/params_encoded_base/size_type.adoc[`size&lowbar;type`] 
| An unsigned integer type to represent sizes&period;

| xref:boost/urls/params_encoded_base/value_type.adoc[`value&lowbar;type`] 
| The value type

|===
== Member Functions

[cols=2]
|===
| Name | Description 

| xref:boost/urls/params_encoded_ref/append.adoc[`append`] 
| Append params


| xref:boost/urls/params_encoded_ref/assign.adoc[`assign`] 
| Assign params


| xref:boost/urls/params_encoded_base/begin.adoc[`begin`] 
| Return an iterator to the beginning

| xref:boost/urls/params_encoded_base/buffer.adoc[`buffer`] 
| Return the query corresponding to these params

| xref:boost/urls/params_encoded_ref/clear.adoc[`clear`] 
| Clear the contents of the container

| xref:boost/urls/params_encoded_base/contains.adoc[`contains`] 
| Return true if a matching key exists

| xref:boost/urls/params_encoded_base/count.adoc[`count`] 
| Return the number of matching keys

| xref:boost/urls/params_encoded_base/empty.adoc[`empty`] 
| Return true if there are no params

| xref:boost/urls/params_encoded_base/end.adoc[`end`] 
| Return an iterator to the end

| xref:boost/urls/params_encoded_ref/erase.adoc[`erase`] 
| Erase params


| xref:boost/urls/params_encoded_base/find.adoc[`find`] 
| Find a matching key


| xref:boost/urls/params_encoded_base/find_last.adoc[`find&lowbar;last`] 
| Find a matching key


| xref:boost/urls/params_encoded_ref/insert.adoc[`insert`] 
| Insert params


| xref:boost/urls/params_encoded_ref/2conversion.adoc[`operator params&lowbar;encoded&lowbar;view`] 
| Conversion

| xref:boost/urls/params_encoded_ref/operator_assign.adoc[`operator&equals;`] 
| Assignment


| xref:boost/urls/params_encoded_ref/2constructor-01.adoc[`params&lowbar;encoded&lowbar;ref`]         [.small]#[constructor]#
| Constructor

| xref:boost/urls/params_encoded_ref/replace.adoc[`replace`] 
| Replace params


| xref:boost/urls/params_encoded_ref/set.adoc[`set`] 
| Set a value


| xref:boost/urls/params_encoded_base/size.adoc[`size`] 
| Return the number of params

| xref:boost/urls/params_encoded_ref/unset.adoc[`unset`] 
| Remove the value on an element

| xref:boost/urls/params_encoded_ref/url.adoc[`url`] 
| Return the referenced url

|===
== Static Member Functions

[cols=2]
|===
| Name | Description 

| xref:boost/urls/params_encoded_base/max_size.adoc[`max&lowbar;size`] 
| Return the maximum number of characters possible

|===



== Description


Objects of this type are used to interpret    the query parameters as a bidirectional view    of key value pairs&period;

The view does not retain ownership of the    elements and instead references the original    url&period; The caller is responsible for ensuring    that the lifetime of the referenced url    extends until it is no longer referenced&period;

The view is modifiable&semi; calling non&hyphen;const    members causes changes to the referenced    url&period;


=== Example

[,cpp]
----
url u( "?first=John&last=Doe" );

params_encoded_ref p = u.encoded_params();
----
Strings produced when elements are returned    have type xref:boost/urls/param_pct_view.adoc[param&lowbar;pct&lowbar;view] and represent    encoded strings&period; Strings passed to member    functions may contain percent escapes, and    throw exceptions on invalid inputs&period;


=== Iterator Invalidation

Changes to the underlying character buffer    can invalidate iterators which reference it&period;    Modifications made through the container    invalidate some iterators to the underlying    character buffer&colon;

* append
 &colon; Only 
`end()`
&period;    
* assign
, 
clear
,        
`operator&equals;`
 &colon; All params&period;    
* erase
 &colon; Erased params and all        params after (including 
`end()`
)&period;
    
* insert
 &colon; All params at or after        the insertion point (including 
`end()`
)&period;
    
* replace
, 
set
 &colon; Modified        params and all params
        after (including 
`end()`
)&period;

A view representing query parameters in a URL

Objects of this type are used to interpret    the query parameters as a bidirectional view    of key value pairs&period;

The view does not retain ownership of the    elements and instead references the original    url&period; The caller is responsible for ensuring    that the lifetime of the referenced url    extends until it is no longer referenced&period;

The view is modifiable&semi; calling non&hyphen;const    members causes changes to the referenced    url&period;


=== Example

[,cpp]
----
url u( "?first=John&last=Doe" );

params_encoded_ref p = u.encoded_params();
----
Strings produced when elements are returned    have type xref:boost/urls/param_pct_view.adoc[param&lowbar;pct&lowbar;view] and represent    encoded strings&period; Strings passed to member    functions may contain percent escapes, and    throw exceptions on invalid inputs&period;


=== Iterator Invalidation

Changes to the underlying character buffer    can invalidate iterators which reference it&period;    Modifications made through the container    invalidate some iterators to the underlying    character buffer&colon;

* append
 &colon; Only 
`end()`
&period;    
* assign
, 
clear
,        
`operator&equals;`
 &colon; All params&period;    
* erase
 &colon; Erased params and all        params after (including 
`end()`
)&period;
    
* insert
 &colon; All params at or after        the insertion point (including 
`end()`
)&period;
    
* replace
, 
set
 &colon; Modified        params and all params
        after (including 
`end()`
)&period;





[.small]#Created with https://www.mrdocs.com[MrDocs]#
