0
Fork 0
mirror of https://github.com/ninenines/cowboy.git synced 2025-07-14 12:20:24 +00:00

updated documentation on AcceptCallback

This commit is contained in:
Martin Björklund 2020-10-07 19:07:15 +02:00
parent aabac3f2d7
commit a10a37fd33

View file

@ -107,9 +107,8 @@ representation of the resource. When creating a new resource with POST
at a different location, return `{created, URI}` or `{see_other, URI`} at a different location, return `{created, URI}` or `{see_other, URI`}
with `URI` the new location. with `URI` the new location.
Returning `{created, URI`} will result in a '201 Created' response. The `see_other` tuple will redirect the client to the new location
automatically.
Returning `{see_other, URI`} will result in a '303 See Other' response.
For PATCH requests, the body is a series of instructions on For PATCH requests, the body is a series of instructions on
how to update the resource. Patch files or JSON Patch are how to update the resource. Patch files or JSON Patch are
@ -731,7 +730,7 @@ listed here, like the authorization header.
== Changelog == Changelog
* *2.9*: An `AcceptCallback` can now return `{created, URI}` and * *2.9*: An `AcceptCallback` can now return `{created, URI}` or
`{see_other, URI}`. The old return value `{true, URI}` is `{see_other, URI}`. The old return value `{true, URI}` is
deprecated. deprecated.
* *2.7*: The media type wildcard in `content_types_accepted` * *2.7*: The media type wildcard in `content_types_accepted`