aboutsummaryrefslogblamecommitdiffstats
path: root/templates/cowboy_rest_h.erl
blob: a15f4a50553add8b9418ec8cfc41a9a6b0f953d3 (plain) (tree)
1
2
3
4
5
6
7
8
9
10
11
12
13
14













                                                                    
-module(template_name).

-export([init/3]).
-export([content_types_provided/2]).
-export([get_html/2]).

init(_, _Req, _Opts) ->
	{upgrade, protocol, cowboy_rest}.

content_types_provided(Req, State) ->
	{[{{<<"text">>, <<"html">>, '*'}, get_html}], Req, State}.

get_html(Req, State) ->
	{<<"<html><body>This is REST!</body></html>">>, Req, State}.