RESTinio
Loading...
Searching...
No Matches
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:
restinio::utils::x_www_form_urlencoded_unescape_traits restinio::parse_query_traits::details::ampersand_only_as_separators

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:

query_string_params_t parse_query(string_view_t original_query_string)
Parse query key-value parts.
Since
v.0.6.5
Examples
sample/try_parse_query_string/main.cpp.

Definition at line 290 of file uri_helpers.hpp.


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