blob: 42e6ce15fccd54d0f64f74982b08667e4da49a7b (
plain) (
tree)
|
|
<tt>
<div dir="ltr">Hello.<div><br></div><div>You wrote <a href="http://ninenines.eu/docs/en/cowboy/HEAD/manual/cowboy_rest/">here</a> that "The only mandatory callback is init/3, needed to perform the protocol upgrade."</div><br>
<div><br></div><div>In my code I have only this function for the protocol upgrade:</div><div><br></div><div><div>init({_TransportName, _ProtocolName}, _Req, []) -></div><div> {upgrade, protocol, cowboy_rest}.</div></div><br>
<div><br></div><div>On the other hand, when compiling, I get the following warnings:</div><div><br></div><div><div>src/handler_transactions.erl:3: Warning: undefined callback function handle/2 (behaviour 'cowboy_http_handler')</div><br>
<div>src/handler_transactions.erl:3: Warning: undefined callback function terminate/3 (behaviour 'cowboy_http_handler')</div></div><div><br></div><div>Is this the expected behavior? I know I _can_ ignore the warnings, but not if I want to use Erlang compiler option warnings_as_errors, for example.</div><br>
<div><br></div><div>Many thanks.</div><div><br></div><div>- Paulo F. Oliveira</div><br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
</div><br>
</tt>
|