UNPKG

@httpc/kit

Version:

httpc toolbox for building function-based API with minimal code and end-to-end type safety

23 lines (22 loc) 1.05 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.Response = exports.Request = exports.Headers = exports.fetch = void 0; let fetch; exports.fetch = fetch; let Headers; exports.Headers = Headers; let Request; exports.Request = Request; let Response; exports.Response = Response; (function (global) { var _a; (_a = global || {}, exports.fetch = fetch = _a.fetch, exports.Headers = Headers = _a.Headers, exports.Request = Request = _a.Request, exports.Response = Response = _a.Response); //@ts-ignore }(typeof globalThis !== 'undefined' ? globalThis : typeof self !== 'undefined' ? self : typeof global !== 'undefined' ? global : this)); if (!fetch) { throw new Error("Missing fetch API. Be sure fetch is available from the global object or polyfill it (es: with 'cross-fetch' module)"); } if (!Headers || !Request || !Response) { throw new Error("Missing fetch API components. Be sure fetch related classes (Request, Response, ...) are available from the global context"); }