Parsing Form URL-encoded (application/x-www-form-urlencoded)

Form URL encoding is a method of encoding form data in a URL query string. It assigns values to specified parameters in a uniform resource locator (URL). This encoding is commonly used when submitting HTML forms.

When a form is submitted, the content of its fields is encoded as a query string. Each field-value pair is separated by an equals sign (=), and the pairs are separated by an ampersand (&). For example, field1=value1&field2=value2&field3=value3.

Web frameworks often allow multiple values to be associated with a single field. This can be achieved by repeating the field name in the query string, such as field1=value1&field1=value2&field2=value3.

The query string can include fields that are not visible to the user. These hidden fields are also included in the query string when the form is submitted.

The W3C recommends using only ampersand as the query separator since 2014. However, in the past, semicolon separators were also supported to allow application/x-www-form-urlencoded query strings in URLs within HTML documents without entity escaping ampersands.

It's important to note that the form content is only encoded in the URL's query string when the form submission method is GET. When the submission method is POST, the encoding is used in the HTTP request body instead of modifying the URL.1

Source:
[1] en.wikipedia.org/wiki/Query_string


Choose from 119 ops
Latest ops 0
Favorite ops 0
Calculations
0