"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.isSuccessfulStatus = exports.isHttps = void 0;
exports.isHttps = (url) => {
    const u = new URL(url);
    if (u.protocol === 'https:') {
        return true;
    }
    if (u.protocol === 'http:') {
        return false;
    }
    throw new Error(`Unexpected protocol for URL: ${u.protocol}`);
};
exports.isSuccessfulStatus = (httpStatus) => httpStatus >= 200 && httpStatus < 300;
