[erlang-questions] [ANN] Cowboy 2.0.0-pre.4

Loïc Hoguin essen@REDACTED
Tue Jan 3 20:00:07 CET 2017

Hey, thanks for the feedback!

It's not 100% static HTML, the current page's links on the right are 
populated by a small piece of JS. Everything else is static.

On 01/03/2017 07:09 PM, Ladislav Lenart wrote:
> What I have not found (though I have not red the entire manual):
> - A top-level overview where the concepts such as protocols, handlers, behaviors
> and middlewares are explained (i.e. what is it, when to use it and why and its
> relations to others).

That would be the role of the user guide. There should be a link on the 
right. I have mixed feelings on the user guide right now, but can't 
quite point my finger on it just yet.

I am also well aware that there isn't much linking between the guide and 
the manual at the moment. I'll be fixing that when time allows.

> Out of curiosity, why (in cowboy:start_clear) is TransportOpts a list of pairs
> while ProtocolOpts is a map? Is this to ensure that the user does not swap them
> unwittingly?

That's because the underlying library expects a list. Part of that is 
because maps didn't exist at the time, and parts because some transport 
options can be repeated (the raw options for example).

This is the same options as in gen_tcp/ssl, plus a few extra specific to 

I suppose it would be possible to accept both, but Cowboy would have to 
almost immediately convert the map to a list.

Loïc Hoguin

More information about the erlang-questions mailing list