On Thu, Apr 9, 2015 at 12:49 PM, Aleksander Machniak <[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] > 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
