request-promise-lite
request-promise-lite copied to clipboard
Support for statusCode in all responses/response types
Currently, the library does not return the statusCode as part of the response. It is often beneficial to be able to discern the returned statusCode for an HTTP request even if error has not an occurred. Being able to discern and handle responses that return with a 200 or 204 HTTP status code is particularly useful and currently lacking in successful requests. Of particular interest is when there is no body returned for non-JSON based responses. Without the statusCode, the response is a null body with no other confirmation that the request was successful.
Any way to add support for returning the statusCode for all responses? Thanks in advance.
Agree, it would be helpful. Any ideas on how to add it without breaking the API (of just returning the actual payload)?