aboutsummaryrefslogtreecommitdiffstats
path: root/test/handlers/echo_h.erl
diff options
context:
space:
mode:
Diffstat (limited to 'test/handlers/echo_h.erl')
-rw-r--r--test/handlers/echo_h.erl5
1 files changed, 4 insertions, 1 deletions
diff --git a/test/handlers/echo_h.erl b/test/handlers/echo_h.erl
index 6db43fe..cdb9be4 100644
--- a/test/handlers/echo_h.erl
+++ b/test/handlers/echo_h.erl
@@ -11,6 +11,9 @@ echo(What, Req, Opts) ->
F = binary_to_atom(What, latin1),
Value = case cowboy_req:F(Req) of
V when is_integer(V) -> integer_to_binary(V);
+ V when is_atom(V) -> atom_to_binary(V, latin1);
+ V when is_list(V); is_tuple(V) -> io_lib:format("~p", [V]);
V -> V
end,
- {ok, cowboy_req:reply(200, #{}, Value, Req), Opts}.
+ cowboy_req:reply(200, #{}, Value, Req),
+ {ok, Req, Opts}.