http_handler.erl 366 B

123456789101112131415
  1. %% Feel free to use, reuse and abuse the code in this file.
  2. -module(http_handler).
  3. -behaviour(cowboy_http_handler).
  4. -export([init/3, handle/2, terminate/2]).
  5. init({_Transport, http}, Req, _Opts) ->
  6. {ok, Req, undefined}.
  7. handle(Req, State) ->
  8. {ok, Req2} = cowboy_http_req:reply(200, [], "http_handler", Req),
  9. {ok, Req2, State}.
  10. terminate(_Req, _State) ->
  11. ok.