From a10a37fd33b6ba53b1da1dfcd94ec49cb7fa6882 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20Bj=C3=B6rklund?= Date: Wed, 7 Oct 2020 19:07:15 +0200 Subject: [PATCH] updated documentation on AcceptCallback --- doc/src/manual/cowboy_rest.asciidoc | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/doc/src/manual/cowboy_rest.asciidoc b/doc/src/manual/cowboy_rest.asciidoc index e091bc25..1a351aa4 100644 --- a/doc/src/manual/cowboy_rest.asciidoc +++ b/doc/src/manual/cowboy_rest.asciidoc @@ -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`} with `URI` the new location. -Returning `{created, URI`} will result in a '201 Created' response. - -Returning `{see_other, URI`} will result in a '303 See Other' response. +The `see_other` tuple will redirect the client to the new location +automatically. For PATCH requests, the body is a series of instructions on how to update the resource. Patch files or JSON Patch are @@ -731,7 +730,7 @@ listed here, like the authorization header. == 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 deprecated. * *2.7*: The media type wildcard in `content_types_accepted`