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

Improve Websocket example

This commit is contained in:
Loïc Hoguin 2013-02-09 15:38:35 +01:00
parent efbd913326
commit 574c3d4900
5 changed files with 14 additions and 4 deletions

View file

@ -11,7 +11,9 @@ init(_Transport, Req, []) ->
handle(Req, State) ->
Html = get_html(),
{ok, Req2} = cowboy_req:reply(200, [], Html, Req),
{ok, Req2} = cowboy_req:reply(200,
[{<<"content-type">>, <<"text/html">>}],
Html, Req),
{ok, Req2, State}.
terminate(_Reason, _Req, _State) ->