init(Req, State) + -> {cowboy_rest, Req, State} + | {cowboy_rest, Req, State, hibernate} + | {cowboy_rest, Req, State, timeout()} + | {cowboy_rest, Req, State, timeout(), hibernate} + +Callback(Req, State) + -> {Result, Req, State} + | {stop, Req, State} + +terminate(Reason, Req, State) -> ok %% optional + +Req :: cowboy_req:req() +State :: any() +Reason :: normal + | {crash, error | exit | throw, any()} + +Callback - see below +Result - see below +Default - see below