host(Req :: cowboy_req:req()) -> Host :: binary()
cowboy_req:host - URI host name
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.
The Req object.
The host name is returned as a lowercase binary string. It is case insensitive.
2.0: Only the host name is returned, it is no longer wrapped in a tuple.
1.0: Function introduced.
Host = cowboy_req:host(Req).