0
Fork 0
mirror of https://github.com/ninenines/cowboy.git synced 2025-07-14 12:20:24 +00:00

Introduce cowboy_req:sock/1 and cowboy_req:cert/1

To obtain the local socket ip/port and the client TLS
certificate, respectively.
This commit is contained in:
Loïc Hoguin 2017-10-25 20:17:21 +01:00
parent 4090adaecc
commit ef58e15547
No known key found for this signature in database
GPG key ID: 71366FF21851DF03
9 changed files with 268 additions and 35 deletions

View file

@ -110,6 +110,7 @@ gun_open(Config, Opts) ->
{ok, ConnPid} = gun:open("localhost", config(port, Config), Opts#{
retry => 0,
transport => config(type, Config),
transport_opts => proplists:get_value(transport_opts, Config, []),
protocols => [config(protocol, Config)]
}),
ConnPid.