Import std.net.url
QueryParams
class
Public Class QueryParams Implements Printable, Iterable<(String, String)>
A query's names and values, in order, as an HTML form sends them: "a=1&b=two%20words", where a + is a space. One name can have many values.
Examples
Local query = QueryParams("q=two%20words&page=2")
Expect(query.Get("q") == "two words")
query.Set("page", "3")
query.Add("tag", "a&b")
Expect("{query}" == "q=two+words&page=3&tag=a%26b")-
A new, empty QueryParams.
-
The names and values
queryhas, after its ?, if it starts with one. -
How many pairs it has.
-
The first value of
name, or Null when it has none. -
Each value of
name, in order. -
Whether it has
name, ornamewith value. -
Whether it has
namewithvalue. -
Adds
nameandvalueat the end, after any valuesnamehas. -
Gives
namevalue: its first pair's, taking the others out, or a new one at the end. -
Takes out each pair of
name, or ofnameand value, and gives whether there was one. -
Takes out each of
name's values that arevalue, and tells whether it had any. -
Puts the pairs in the order of their names, by UTF-16 code units, as the standard says, keeping the order of one name's values: a merge sort, by each name's order worked out once.
-
Each name and value, in order.
-
The query's text, without a ?: each name, =, and value, with & between pairs, a space as a +, and what isn't a letter, a digit, or one of *-._ percent-encoded.
Report an issue with this page or with FutureBlitz on GitHub.