init(Req, State) + -> {cowboy_loop, Req, State} + | {cowboy_loop, Req, State, hibernate} + | {cowboy_loop, Req, State, timeout()} + | {cowboy_loop, Req, State, timeout(), hibernate} + +info(Info, Req, State) + -> {ok, Req, State} + | {ok, Req, State, hibernate} + | {stop, Req, State} + +terminate(Reason, Req, State) -> ok %% optional + +Req :: cowboy_req:req() +State :: any() +Info :: any() +Reason :: stop | timeout + | {crash, error | exit | throw, any()}