This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
%% See LICENSE for licensing information. | |
-module(cowboy_debug). | |
-export([onrequest_hook/1]). | |
-export([onresponse_hook/4]). | |
onrequest_hook(Req) -> | |
Method = to_string(extract(cowboy_req:method(Req))), | |
Path = to_string(extract(cowboy_req:path(Req))), | |
Params = params_to_string(extract(cowboy_req:qs_vals(Req))), |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env escript | |
my_name() -> "Andrzej Sliwa". | |
my_email() -> "andrzej.sliwa@my_domain.com". | |
pairs() -> | |
[{"an-ar", | |
[{left, my_name()}, {right, "Artur Kowalski"}, | |
{email, "andrzej+artur@my_domain.com"}]}, | |
{"an-jan", |