assert-successful-request
v1.0.2
Published
Simple callback function to assert successful HTTP responses made with the request module
Downloads
5
Maintainers
Readme
assert-successful-request
Simple callback function to assert successful HTTP responses made with the request module
How to use
const assertSuccessfulResponse = require('assert-successful-request')
request({ uri: 'https://google.com' }, assertSuccessfulResponse)
Simply pass the function as a callback to your request
-call to assert that
the request was successful.
A request is considered successful if it it resulted in a non-error HTTP status code.