mirror of
https://github.com/ninenines/cowboy.git
synced 2025-07-14 12:20:24 +00:00
Document using undefined as content_types_provided callback
This is a convention that indicates the callback will never be called, for example because the methods HEAD or GET are not accepted.
This commit is contained in:
parent
15fb3187f5
commit
dba17fdddb
1 changed files with 4 additions and 1 deletions
|
@ -136,7 +136,10 @@ are provided? What languages do I provide?
|
|||
|
||||
Implement the mandatory `content_types_provided`. Prefix
|
||||
the callbacks with `to_` for clarity. For example, `to_html`
|
||||
or `to_text`.
|
||||
or `to_text`. For resources that don't implement methods
|
||||
GET or HEAD, you must still accept at least one media type,
|
||||
but you can leave the callback as `undefined` since it will
|
||||
never be called.
|
||||
|
||||
Implement the `languages_provided` or `charsets_provided`
|
||||
callbacks if applicable.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue