diff options
author | Loïc Hoguin <[email protected]> | 2018-11-14 17:28:22 +0100 |
---|---|---|
committer | Loïc Hoguin <[email protected]> | 2018-11-14 18:04:32 +0100 |
commit | dba17fdddb2d0a7a832afb9480ec6515a38a15d7 (patch) | |
tree | 94d7bda33ec729e257533115a854874a8b0fc3fe /doc/src/guide | |
parent | 15fb3187f594979891f20cac1bec529617a5ef14 (diff) | |
download | cowboy-dba17fdddb2d0a7a832afb9480ec6515a38a15d7.tar.gz cowboy-dba17fdddb2d0a7a832afb9480ec6515a38a15d7.tar.bz2 cowboy-dba17fdddb2d0a7a832afb9480ec6515a38a15d7.zip |
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.
Diffstat (limited to 'doc/src/guide')
-rw-r--r-- | doc/src/guide/resource_design.asciidoc | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/doc/src/guide/resource_design.asciidoc b/doc/src/guide/resource_design.asciidoc index 4ea0390..954d87d 100644 --- a/doc/src/guide/resource_design.asciidoc +++ b/doc/src/guide/resource_design.asciidoc @@ -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. |