Thanks to visit codestin.com Credit goes to github.com
We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent f2f1537 commit fbb36edCopy full SHA for fbb36ed
doc/api/http.md
@@ -2108,6 +2108,8 @@ http.get('http://nodejs.org/dist/index.json', (res) => {
2108
const contentType = res.headers['content-type'];
2109
2110
let error;
2111
+ // Any 2xx status code signals a successful response but
2112
+ // here we're only checking for 200.
2113
if (statusCode !== 200) {
2114
error = new Error('Request Failed.\n' +
2115
`Status Code: ${statusCode}`);
0 commit comments