aboutsummaryrefslogtreecommitdiff
path: root/node_modules/got/dist/source/core/utils/is-response-ok.js
blob: 84c9331837eafe5c4bf731721488fab17e8b481f (plain)
1
2
3
4
5
6
7
8
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.isResponseOk = void 0;
exports.isResponseOk = (response) => {
    const { statusCode } = response;
    const limitStatusCode = response.request.options.followRedirect ? 299 : 399;
    return (statusCode >= 200 && statusCode <= limitStatusCode) || statusCode === 304;
};