You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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
The text was updated successfully, but these errors were encountered:
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
The text was updated successfully, but these errors were encountered: