diff options
Diffstat (limited to 'manual/cowboy_rest.md')
-rw-r--r-- | manual/cowboy_rest.md | 16 |
1 files changed, 12 insertions, 4 deletions
diff --git a/manual/cowboy_rest.md b/manual/cowboy_rest.md index b7890e4..110e224 100644 --- a/manual/cowboy_rest.md +++ b/manual/cowboy_rest.md @@ -168,7 +168,9 @@ REST callbacks description > 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. +> 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. > > This function will be called for POST, PUT and PATCH requests. > It is entirely possible to define different callbacks for different @@ -207,7 +209,7 @@ REST callbacks description > * Value = [{binary() | {Type, SubType, Params}, ProvideResource}] > * Type = SubType = binary() > * Params = '*' | [{binary(), binary()}] -> * AcceptResource = atom() +> * ProvideResource = atom() > > Return the list of content-types the resource provides. > @@ -219,7 +221,9 @@ REST callbacks description > 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. +> 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. > > The `ProvideResource` value is the name of the callback that will > be called if the content-type matches. It is defined as follow. @@ -291,12 +295,16 @@ REST callbacks description ### generate_etag > * Methods: GET, HEAD, POST, PUT, PATCH, DELETE -> * Value type: binary() +> * Value type: binary() | {weak | strong, binary()} > * Default value: undefined > > Return the entity tag of the resource. > > This value will be sent as the value of the etag header. +> +> If a binary is returned, then the value will be parsed +> to the tuple form automatically. The value must be in +> the same format as the etag header, including quotes. ### is_authorized |