Debian Codegraph @

doc/src/manual/cowboy_req.host_info.asciidoc

raw
1 = cowboy_req:host_info(3)
2
3 == Name
4
5 cowboy_req:host_info - Access the route's heading host segments
6
7 == Description
8
9 [source,erlang]
10 ----
11 host_info(Req :: cowboy_req:req()) -> cowboy_router:tokens()
12 ----
13
14 Return the tokens for the heading host segments.
15
16 This is the part of the host name that was matched using
17 the `...` notation.
18
19 == Arguments
20
21 Req::
22
23 The Req object.
24
25 == Return value
26
27 The tokens are returned as a list of case insensitive
28 binary strings.
29
30 == Changelog
31
32 * *2.0*: Only the tokens are returned, they are no longer wrapped in a tuple.
33 * *1.0*: Function introduced.
34
35 == Examples
36
37 .Get the host_info tokens
38 [source,erlang]
39 ----
40 HostInfo = cowboy_req:host_info(Req).
41 ----
42
43 == See also
44
45 link:man:cowboy_req(3)[cowboy_req(3)],
46 link:man:cowboy_req:binding(3)[cowboy_req:binding(3)],
47 link:man:cowboy_req:bindings(3)[cowboy_req:bindings(3)],
48 link:man:cowboy_req:path_info(3)[cowboy_req:path_info(3)],
49 link:man:cowboy_router(3)[cowboy_router(3)]