Skip to content

Provide response code #65

Open
Open
@markg85

Description

@markg85

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions