Streamline API return codes & output it as HTTP header #1277

Open
ozh opened this Issue Apr 6, 2013 · 3 comments

Comments

Projects
None yet
2 participants
@ozh
Member

ozh commented Apr 6, 2013

This is a COPY of Issue 1277: Streamline API return codes & output it as HTTP header, filed on Google Code before the project was moved on Github.

Please review the original issue and especially its comments. Comments here on closed issues will be ignored. Thanks.

Original description

Currently the API result arrays contain either 'statusCode', 'errorCode' or nothing.

- make it consistent: 'statusCode' and 'message' for all methods
- (in case a custom method doesn't implement that, output default status & message)
- use it as a HTTP header in the output

This might induce some breakage for people using API: make a detailed blog post about it
@LeoColomb

This comment has been minimized.

Show comment
Hide comment
@LeoColomb

LeoColomb Feb 21, 2014

Member

make it consistent: 'statusCode' and 'message' for all methods

👍

Par contre, pour respecter SemVer, up to 2.0.

Member

LeoColomb commented Feb 21, 2014

make it consistent: 'statusCode' and 'message' for all methods

👍

Par contre, pour respecter SemVer, up to 2.0.

@LeoColomb LeoColomb modified the milestones: 2.0, 1.8 Feb 21, 2014

@LeoColomb

This comment has been minimized.

Show comment
Hide comment
@LeoColomb

LeoColomb Apr 25, 2014

Member

@ozh Do we need to keep statusCode for an API answer? Because the status code is already accessible in HTTP headers, isn't it?

Member

LeoColomb commented Apr 25, 2014

@ozh Do we need to keep statusCode for an API answer? Because the status code is already accessible in HTTP headers, isn't it?

@ozh

This comment has been minimized.

Show comment
Hide comment
@ozh

ozh Apr 25, 2014

Member

statusCode and the HTTP header should be the same but yes, let's keep it: it makes it easier to check a status with a javascript script only, if needed

Member

ozh commented Apr 25, 2014

statusCode and the HTTP header should be the same but yes, let's keep it: it makes it easier to check a status with a javascript script only, if needed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment