Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Provide response code #65

Open
markg85 opened this issue Dec 9, 2017 · 0 comments
Open

Provide response code #65

markg85 opened this issue Dec 9, 2017 · 0 comments

Comments

@markg85
Copy link

markg85 commented Dec 9, 2017

Hi,

Perhaps this is already possible, but then i apparently didn't find it..
Would it be possible to extend the API to provide the response code?
I'm thinking of a way like:

curl.request(options, function (err, data, code) { //.. });

Meta (the current third argument) would move to the fourth position.

There are some web services out there that use response codes to tell the user something. there seems to be some deviation in how services handle that.

For example, take the TVMaze API. You can request information about series on that API, but if you request something of a series it doesn't know it returns a 404. A very valid not found response. Then there are other services out there that to output a 200 OK code, but with a (json) output indicating that whatever was queried for was not found.

Cheers,
Mark

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant