Good point.

I'll amend documentation and reference code to this regards.

Cheers,
Julien.

On 09/04/15 13:35, Jesús García Sáez wrote:
>
> On Thu, Apr 9, 2015 at 12:49 PM, Aleksander Machniak
> <[email protected] <mailto:[email protected]>> wrote:
>
>     I see 204 is used only in DELETE request responses. Why not use it for
>     other requests returning no content (of course for POST/PUT, not
>     GET/HEAD)?
>
>     Shouldn't this
>     
> http://www.openchange.org/documentation/api/mapistore-http/index.html#put--folders-%28id%29-
>     or
>     
> http://www.openchange.org/documentation/api/mapistore-http/index.html#post--folders-%28id%29-empty
>     respond with 204 code? And what's 201 is doing there?
>
>     Another thing in
>     
> http://www.openchange.org/documentation/api/mapistore-http/index.html#put--folders-%28id%29-.
>     When I should respond with 400 error? Is parent_id change supported
>     here? If so, when client sends invalid parent_id (non-existing folder)
>     should I respond with 400 or 404 or maybe 500?
>
>     --
>     Aleksander Machniak
>     Software Developer, Kolab Systems AG
>     -------------------------------------------------------
>     PGP:19359DC1  -  http://kolabsys.com  -  http://alec.pl
>     _______________________________________________
>     devel mailing list
>     [email protected] <mailto:[email protected]>
>     http://mailman.openchange.org/listinfo/devel
>
>
> In a rest service 201 is when you create a resource, 200 is "ok"
> returning contents, 204 is "ok" but no body.
>
> So I agree with you and those two that you linked should return 204.
>
> Besides that POST folder
> <http://www.openchange.org/documentation/api/mapistore-http/index.html#post--folders->
> should return 201, not 200.
>
>
> _______________________________________________
> devel mailing list
> [email protected]
> http://mailman.openchange.org/listinfo/devel

-- 
Julien Kerihuel
[email protected]
OpenChange Project Founder

Twitter: http://twitter.com/jkerihuel

GPG Fingerprint: 0B55 783D A781 6329 108A  B609 7EF6 FE11 A35F 1F79

Attachment: signature.asc
Description: OpenPGP digital signature

_______________________________________________
devel mailing list
[email protected]
http://mailman.openchange.org/listinfo/devel

Reply via email to