RESTinio

List of all members
restinio::parse_query_traits::x_www_form_urlencoded Struct Reference

Traits for parsing a query string in application/x-www-form-urlencoded mode. More...

`#include <uri_helpers.hpp>`

Inheritance diagram for restinio::parse_query_traits::x_www_form_urlencoded:

## Additional Inherited Members
Static Public Member Functions inherited from restinio::utils::x_www_form_urlencoded_unescape_traits
static constexpr bool | ordinary_char (char c) noexcept
Static Public Member Functions inherited from restinio::parse_query_traits::details::ampersand_only_as_separators
static string_view_t::size_type | find_next_separator (string_view_t where, string_view_t::size_type start_from) noexcept

## Detailed Description

Traits for parsing a query string in application/x-www-form-urlencoded mode.

In that mode:

- `name=value` pairs can be concatenated only by `&`;
- the following characters can only be used unescaped: `*` (0x2A), `-` (0x2D), `.` (0x2E), `_` (0x5F), `0`..`9` (0x30..0x39), `A`..`Z` (0x41..0x5A), `a`..`z` (0x61..0x7A);
- space character (0x20) should be replaced by + (0x2B);
- all other characters should be represented as percent-encoded.

Reference for more details: https://url.spec.whatwg.org/#concept-urlencoded-byte-serializer

Usage example:

auto result = restinio::parse_query<restinio::parse_query_traits::x_www_form_urlencoded>("name=A*");

Since
  v.0.6.5

Examples
  sample/try_parse_query_string/main.cpp.

Definition at line 289 of file uri_helpers.hpp.

The documentation for this struct was generated from the following file:

- restinio/uri_helpers.hpp