blob: 6e923579e9fa13d8082bd5cb3678214c576b2bc0 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
|
= cowboy_req:qs(3)
== Name
cowboy_req:qs - URI query string
== Description
[source,erlang]
----
qs(Req :: cowboy_req:req()) -> Qs :: binary()
----
Return the query string of the effective request URI.
The query string can also be obtained using pattern matching:
[source,erlang]
----
#{qs := Qs} = Req.
----
== Arguments
Req::
The Req object.
== Return value
The query string is returned as a binary string. It is case sensitive.
== Changelog
* *2.0*: Only the query string is returned, it is no longer wrapped in a tuple.
* *1.0*: Function introduced.
== Examples
.Get the effective request URI's query string
[source,erlang]
----
Qs = cowboy_req:qs(Req).
----
== See also
link:man:cowboy_req(3)[cowboy_req(3)],
link:man:cowboy_req:parse_qs(3)[cowboy_req:parse_qs(3)],
link:man:cowboy_req:match_qs(3)[cowboy_req:match_qs(3)]
|