[erlang-questions] [cowboy]Can content_types_accepted match all Cotent-Types?

Jesper Louis Andersen jesper.louis.andersen@REDACTED
Thu Jul 23 14:04:22 CEST 2015

It is documented (Cowboy 1.x):

Cowboy will select the most appropriate content-type from the list. If any
parameter is acceptable, then the tuple form should be used with parameters
set to '*'. If the parameters value is set to [] only content-type values
with no parameters will be accepted. All parameter values are treated in a
case sensitive manner except the charset parameter, if present, which is
case insensitive.

So if you set the content type to '*' (that is the atom()), then any
content type will be accepted by that resource, unless a more specific
content type matches.

On Thu, Jul 23, 2015 at 1:38 PM, 寂寂 <44290016@REDACTED> wrote:

> Dear Erlangers,
> I have a client sending POST request to my server, but I'm not sure what
> kind of Content-type in the POST header. so can I match all Content-Types
> in 'content_types_accepted' of my REST module?
> Thanks
> _______________________________________________
> erlang-questions mailing list
> erlang-questions@REDACTED
> http://erlang.org/mailman/listinfo/erlang-questions

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20150723/4611e96a/attachment.htm>

More information about the erlang-questions mailing list