"use strict";
/**
 * Utilities and types for working with `fetch` functions.
 *
 * @preferred
 * @module fly/fetch
 */
Object.defineProperty(exports, "__esModule", { value: true });
/**
 * Converts RequestInfo into a Request object.
 * @param req raw request
 */
function normalizeRequest(req) {
    if (typeof req === "string") {
        req = new Request(req);
    }
    if (!(req instanceof Request)) {
        throw new Error("req must be either a string or a Request object");
    }
    return req;
}
exports.normalizeRequest = normalizeRequest;
//# sourceMappingURL=index.js.map