From 92b54aacc0de5446dd5497c39897b0bbff72e626 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lo=C3=AFc=20Hoguin?= Date: Wed, 13 Jun 2018 09:54:12 +0200 Subject: Rebuild using Asciideck --- .../cowboy/2.2/manual/cowboy_req.port/index.html | 88 ++++++---------------- 1 file changed, 23 insertions(+), 65 deletions(-) (limited to 'docs/en/cowboy/2.2/manual/cowboy_req.port/index.html') diff --git a/docs/en/cowboy/2.2/manual/cowboy_req.port/index.html b/docs/en/cowboy/2.2/manual/cowboy_req.port/index.html index 93e0a841..d673b554 100644 --- a/docs/en/cowboy/2.2/manual/cowboy_req.port/index.html +++ b/docs/en/cowboy/2.2/manual/cowboy_req.port/index.html @@ -62,90 +62,48 @@

cowboy_req:port(3)

-

Name

-
-

cowboy_req:port - URI port number

-
-
-
+

cowboy_req:port - URI port number

Description

-
-
-
-
port(Req :: cowboy_req:req()) -> Port :: inet:port_number()
-

Return the port number of the effective request URI.

-

Note that the port number returned by this function is obtained -by parsing the host header. It may be different from the port -the peer used to connect to Cowboy.

-

The port number can also be obtained using pattern matching:

-
-
-
#{port := Port} = Req.
-
-
-
+
#{port := Port} = Req.
+

Arguments

-
-
-
-Req -
-
-

-The Req object. -

+
Req
+

The Req object.

-
-
- -
+

Return value

-
-

The port number is returned as an integer.

-
-
-
+

The port number is returned as an integer.

Changelog

-
-
    -
  • -

    -2.0: Only the port number is returned, it is no longer wrapped in a tuple. -

    +
    • 2.0: Only the port number is returned, it is no longer wrapped in a tuple.
    • -
    • -

      -1.0: Function introduced. -

      +
    • 1.0: Function introduced.
    • -
-
-
-
+

Examples

-
-
-
Get the effective request URI’s port number
-
-
Port = cowboy_req:port(Req).
-
-
-
+
Port = cowboy_req:port(Req).
+

See also

-
- -
- +

cowboy_req(3)

+ -- cgit v1.2.3