diff options
author | Loïc Hoguin <[email protected]> | 2011-03-18 13:47:37 +0100 |
---|---|---|
committer | Loïc Hoguin <[email protected]> | 2011-03-18 13:47:37 +0100 |
commit | c6ad0273a826809fcd3d6b47823623ba1c1e5127 (patch) | |
tree | c141a93fbb847dfd214a28f7b7938e03bef17f32 /README.md | |
parent | 5e80e4baaca6ca866555a62db96b8e2623050521 (diff) | |
download | cowboy-c6ad0273a826809fcd3d6b47823623ba1c1e5127.tar.gz cowboy-c6ad0273a826809fcd3d6b47823623ba1c1e5127.tar.bz2 cowboy-c6ad0273a826809fcd3d6b47823623ba1c1e5127.zip |
Introduce Handler:terminate to cleanup the handler's state.
Diffstat (limited to 'README.md')
-rw-r--r-- | README.md | 5 |
1 files changed, 4 insertions, 1 deletions
@@ -63,10 +63,13 @@ use one of the predefined handlers or write your own. An hello world HTTP handler could be written like this: -module(my_handler). - -export([init/2, handle/2]). + -export([init/2, handle/2, terminate/2]). init(Req, Opts) -> {ok, Req, undefined}. handle(Req, State) -> {reply, 200, [], "Hello World!"}. + + terminate(Req, State) -> + ok. |