<div dir="ltr">Got it, thanks.<div><br></div><div>This <a href="http://ninenines.eu/docs/en/cowboy/HEAD/manual/cowboy_rest/">here</a> had the fine print that I hadn't read apparently: "This module cannot be described as a behaviour due to most of the callbacks it defines being optional. It has the same semantics as a behaviour otherwise.<span style="color:rgb(51,51,51);font-family:'Helvetica Neue',Helvetica,Arial,sans-serif;font-size:14px;line-height:19.600000381469727px">"</span></div>
<div><span style="color:rgb(51,51,51);font-family:'Helvetica Neue',Helvetica,Arial,sans-serif;font-size:14px;line-height:19.600000381469727px"><br></span></div><div><span style="color:rgb(51,51,51);font-family:'Helvetica Neue',Helvetica,Arial,sans-serif;font-size:14px;line-height:19.600000381469727px">- Paulo F. Oliveira</span></div>
</div><div class="gmail_extra"><br><br><div class="gmail_quote">On 4 June 2014 22:46, Loïc Hoguin <span dir="ltr"><<a href="mailto:essen@ninenines.eu" target="_blank">essen@ninenines.eu</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
You shouldn't say -behavior(cowboy_http_handler) if you don't actually implement it.<br>
<br>
On 06/04/2014 11:37 PM, Paulo F. Oliveira wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Hello.<br>
<br>
You wrote here<br>
<<a href="http://ninenines.eu/docs/en/cowboy/HEAD/manual/cowboy_rest/" target="_blank">http://ninenines.eu/docs/en/<u></u>cowboy/HEAD/manual/cowboy_<u></u>rest/</a>> that "The<div><div class="h5"><br>
only mandatory callback is init/3, needed to perform the protocol upgrade."<br>
<br>
In my code I have only this function for the protocol upgrade:<br>
<br>
init({_TransportName, _ProtocolName}, _Req, []) -><br>
{upgrade, protocol, cowboy_rest}.<br>
<br>
On the other hand, when compiling, I get the following warnings:<br>
<br>
src/handler_transactions.erl:<u></u>3: Warning: undefined callback function<br>
handle/2 (behaviour 'cowboy_http_handler')<br>
src/handler_transactions.erl:<u></u>3: Warning: undefined callback function<br>
terminate/3 (behaviour 'cowboy_http_handler')<br>
<br>
Is this the expected behavior? I know I _can_ ignore the warnings, but<br>
not if I want to use Erlang compiler option warnings_as_errors, for example.<br>
<br>
Many thanks.<br>
<br>
- Paulo F. Oliveira<br>
<br>
<br></div></div>
______________________________<u></u>_________________<br>
Extend mailing list<br>
<a href="mailto:Extend@lists.ninenines.eu" target="_blank">Extend@lists.ninenines.eu</a><br>
<a href="https://lists.ninenines.eu/listinfo/extend" target="_blank">https://lists.ninenines.eu/<u></u>listinfo/extend</a><br>
<br><span class="HOEnZb"><font color="#888888">
</font></span></blockquote><span class="HOEnZb"><font color="#888888">
<br>
-- <br>
Loïc Hoguin<br>
<a href="http://ninenines.eu" target="_blank">http://ninenines.eu</a><br>
</font></span></blockquote></div><br></div>