From fec98300ec9af6c8b5f3120a60f217983c451076 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lo=C3=AFc=20Hoguin?= Date: Wed, 2 May 2018 11:35:26 +0200 Subject: Cowboy 2.4.0 --- .../cowboy/2.4/manual/cowboy_req.host/index.html | 229 +++++++++++++++++++++ 1 file changed, 229 insertions(+) create mode 100644 docs/en/cowboy/2.4/manual/cowboy_req.host/index.html (limited to 'docs/en/cowboy/2.4/manual/cowboy_req.host/index.html') diff --git a/docs/en/cowboy/2.4/manual/cowboy_req.host/index.html b/docs/en/cowboy/2.4/manual/cowboy_req.host/index.html new file mode 100644 index 00000000..dabe2c0e --- /dev/null +++ b/docs/en/cowboy/2.4/manual/cowboy_req.host/index.html @@ -0,0 +1,229 @@ + + + + + + + + + + + + Nine Nines: cowboy_req:host(3) + + + + + + + + + + + + + + + + +
+
+
+
+ +

cowboy_req:host(3)

+ +
+

Name

+
+

cowboy_req:host - URI host name

+
+
+
+

Description

+
+
+
+
host(Req :: cowboy_req:req()) -> Host :: binary()
+

Return the host name of the effective request URI.

+

The host name can also be obtained using pattern matching:

+
+
+
#{host := Host} = Req.
+
+
+
+

Arguments

+
+
+
+Req +
+
+

+The Req object. +

+
+
+
+
+
+

Return value

+
+

The host name is returned as a lowercase binary string. +It is case insensitive.

+
+
+
+

Changelog

+
+
    +
  • +

    +2.0: Only the host name is returned, it is no longer wrapped in a tuple. +

    +
  • +
  • +

    +1.0: Function introduced. +

    +
  • +
+
+
+
+

Examples

+
+
+
Get the effective request URI’s host name
+
+
Host = cowboy_req:host(Req).
+
+
+ + + + + + +
+ +
+ + +

+ Cowboy + 2.4 + Function Reference + +

+ + + +

Navigation

+ +

Version select

+ + +
+
+
+
+ + + + + + + + + -- cgit v1.2.3