2022-01-07 22:09:52 -05:00
|
|
|
// Copyright 2018-2022 the Deno authors. All rights reserved. MIT license.
|
2021-04-20 08:47:22 -04:00
|
|
|
|
|
|
|
// @ts-check
|
|
|
|
/// <reference path="../webidl/internal.d.ts" />
|
|
|
|
/// <reference path="../web/internal.d.ts" />
|
|
|
|
/// <reference path="../url/internal.d.ts" />
|
2021-06-10 09:26:10 -04:00
|
|
|
/// <reference path="../web/lib.deno_web.d.ts" />
|
2021-04-20 08:47:22 -04:00
|
|
|
/// <reference path="./internal.d.ts" />
|
2021-06-14 07:51:02 -04:00
|
|
|
/// <reference path="../web/06_streams_types.d.ts" />
|
2021-04-20 08:47:22 -04:00
|
|
|
/// <reference path="./lib.deno_fetch.d.ts" />
|
|
|
|
/// <reference lib="esnext" />
|
|
|
|
"use strict";
|
|
|
|
|
|
|
|
((window) => {
|
2021-10-11 17:43:52 -04:00
|
|
|
const { isProxy } = Deno.core;
|
2021-04-20 08:47:22 -04:00
|
|
|
const webidl = window.__bootstrap.webidl;
|
2021-07-08 09:43:36 -04:00
|
|
|
const consoleInternal = window.__bootstrap.console;
|
2021-04-20 08:47:22 -04:00
|
|
|
const { HTTP_TAB_OR_SPACE, regexMatcher } = window.__bootstrap.infra;
|
2021-05-18 11:24:01 -04:00
|
|
|
const { extractBody, mixinBody } = window.__bootstrap.fetchBody;
|
2021-04-20 08:47:22 -04:00
|
|
|
const { getLocationHref } = window.__bootstrap.location;
|
|
|
|
const mimesniff = window.__bootstrap.mimesniff;
|
|
|
|
const { URL } = window.__bootstrap.url;
|
|
|
|
const {
|
|
|
|
getDecodeSplitHeader,
|
|
|
|
headerListFromHeaders,
|
|
|
|
headersFromHeaderList,
|
|
|
|
guardFromHeaders,
|
|
|
|
fillHeaders,
|
|
|
|
} = window.__bootstrap.headers;
|
2021-07-06 05:32:59 -04:00
|
|
|
const {
|
|
|
|
ArrayPrototypeMap,
|
|
|
|
ArrayPrototypePush,
|
|
|
|
MapPrototypeHas,
|
|
|
|
MapPrototypeGet,
|
|
|
|
MapPrototypeSet,
|
2022-02-01 12:06:11 -05:00
|
|
|
ObjectPrototypeIsPrototypeOf,
|
2021-07-06 05:32:59 -04:00
|
|
|
RangeError,
|
|
|
|
RegExp,
|
|
|
|
RegExpPrototypeTest,
|
2022-02-07 07:54:32 -05:00
|
|
|
SafeArrayIterator,
|
2021-07-06 05:32:59 -04:00
|
|
|
Symbol,
|
|
|
|
SymbolFor,
|
|
|
|
TypeError,
|
|
|
|
} = window.__bootstrap.primordials;
|
2021-04-20 08:47:22 -04:00
|
|
|
|
|
|
|
const VCHAR = ["\x21-\x7E"];
|
|
|
|
const OBS_TEXT = ["\x80-\xFF"];
|
|
|
|
|
2022-02-07 07:54:32 -05:00
|
|
|
const REASON_PHRASE = [
|
|
|
|
...new SafeArrayIterator(HTTP_TAB_OR_SPACE),
|
|
|
|
...new SafeArrayIterator(VCHAR),
|
|
|
|
...new SafeArrayIterator(OBS_TEXT),
|
|
|
|
];
|
2021-04-20 08:47:22 -04:00
|
|
|
const REASON_PHRASE_MATCHER = regexMatcher(REASON_PHRASE);
|
|
|
|
const REASON_PHRASE_RE = new RegExp(`^[${REASON_PHRASE_MATCHER}]*$`);
|
|
|
|
|
|
|
|
const _response = Symbol("response");
|
|
|
|
const _headers = Symbol("headers");
|
|
|
|
const _mimeType = Symbol("mime type");
|
|
|
|
const _body = Symbol("body");
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @typedef InnerResponse
|
|
|
|
* @property {"basic" | "cors" | "default" | "error" | "opaque" | "opaqueredirect"} type
|
|
|
|
* @property {() => string | null} url
|
|
|
|
* @property {string[]} urlList
|
|
|
|
* @property {number} status
|
|
|
|
* @property {string} statusMessage
|
|
|
|
* @property {[string, string][]} headerList
|
2021-05-18 11:24:01 -04:00
|
|
|
* @property {null | typeof __window.bootstrap.fetchBody.InnerBody} body
|
2021-06-06 09:37:17 -04:00
|
|
|
* @property {boolean} aborted
|
2021-04-20 08:47:22 -04:00
|
|
|
* @property {string} [error]
|
|
|
|
*/
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @param {number} status
|
2021-04-28 10:08:51 -04:00
|
|
|
* @returns {boolean}
|
2021-04-20 08:47:22 -04:00
|
|
|
*/
|
|
|
|
function nullBodyStatus(status) {
|
|
|
|
return status === 101 || status === 204 || status === 205 || status === 304;
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @param {number} status
|
2021-04-28 10:08:51 -04:00
|
|
|
* @returns {boolean}
|
2021-04-20 08:47:22 -04:00
|
|
|
*/
|
|
|
|
function redirectStatus(status) {
|
|
|
|
return status === 301 || status === 302 || status === 303 ||
|
|
|
|
status === 307 || status === 308;
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* https://fetch.spec.whatwg.org/#concept-response-clone
|
2021-04-28 10:08:51 -04:00
|
|
|
* @param {InnerResponse} response
|
2021-04-20 08:47:22 -04:00
|
|
|
* @returns {InnerResponse}
|
|
|
|
*/
|
|
|
|
function cloneInnerResponse(response) {
|
2022-02-07 07:54:32 -05:00
|
|
|
const urlList = [...new SafeArrayIterator(response.urlList)];
|
2021-07-06 05:32:59 -04:00
|
|
|
const headerList = [
|
2022-02-07 07:54:32 -05:00
|
|
|
...new SafeArrayIterator(
|
|
|
|
ArrayPrototypeMap(response.headerList, (x) => [x[0], x[1]]),
|
|
|
|
),
|
2021-07-06 05:32:59 -04:00
|
|
|
];
|
2021-04-20 08:47:22 -04:00
|
|
|
let body = null;
|
|
|
|
if (response.body !== null) {
|
|
|
|
body = response.body.clone();
|
|
|
|
}
|
|
|
|
|
|
|
|
return {
|
|
|
|
type: response.type,
|
|
|
|
body,
|
|
|
|
headerList,
|
|
|
|
urlList,
|
|
|
|
status: response.status,
|
|
|
|
statusMessage: response.statusMessage,
|
2021-06-06 09:37:17 -04:00
|
|
|
aborted: response.aborted,
|
2021-09-26 17:46:56 -04:00
|
|
|
url() {
|
|
|
|
if (this.urlList.length == 0) return null;
|
|
|
|
return this.urlList[this.urlList.length - 1];
|
|
|
|
},
|
2021-04-20 08:47:22 -04:00
|
|
|
};
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @returns {InnerResponse}
|
|
|
|
*/
|
|
|
|
function newInnerResponse(status = 200, statusMessage = "") {
|
|
|
|
return {
|
2021-09-26 17:46:56 -04:00
|
|
|
type: "default",
|
|
|
|
body: null,
|
2021-04-20 08:47:22 -04:00
|
|
|
headerList: [],
|
|
|
|
urlList: [],
|
|
|
|
status,
|
|
|
|
statusMessage,
|
2021-09-26 17:46:56 -04:00
|
|
|
aborted: false,
|
|
|
|
url() {
|
|
|
|
if (this.urlList.length == 0) return null;
|
|
|
|
return this.urlList[this.urlList.length - 1];
|
|
|
|
},
|
2021-04-20 08:47:22 -04:00
|
|
|
};
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @param {string} error
|
|
|
|
* @returns {InnerResponse}
|
|
|
|
*/
|
|
|
|
function networkError(error) {
|
|
|
|
const resp = newInnerResponse(0);
|
|
|
|
resp.type = "error";
|
|
|
|
resp.error = error;
|
|
|
|
return resp;
|
|
|
|
}
|
|
|
|
|
2021-06-06 09:37:17 -04:00
|
|
|
/**
|
|
|
|
* @returns {InnerResponse}
|
|
|
|
*/
|
|
|
|
function abortedNetworkError() {
|
|
|
|
const resp = networkError("aborted");
|
|
|
|
resp.aborted = true;
|
|
|
|
return resp;
|
|
|
|
}
|
|
|
|
|
2021-04-20 08:47:22 -04:00
|
|
|
class Response {
|
|
|
|
get [_mimeType]() {
|
|
|
|
let charset = null;
|
|
|
|
let essence = null;
|
|
|
|
let mimeType = null;
|
2021-11-22 19:23:11 -05:00
|
|
|
const values = getDecodeSplitHeader(
|
|
|
|
headerListFromHeaders(this[_headers]),
|
|
|
|
"Content-Type",
|
|
|
|
);
|
2021-04-20 08:47:22 -04:00
|
|
|
if (values === null) return null;
|
|
|
|
for (const value of values) {
|
|
|
|
const temporaryMimeType = mimesniff.parseMimeType(value);
|
|
|
|
if (
|
|
|
|
temporaryMimeType === null ||
|
|
|
|
mimesniff.essence(temporaryMimeType) == "*/*"
|
|
|
|
) {
|
|
|
|
continue;
|
|
|
|
}
|
|
|
|
mimeType = temporaryMimeType;
|
|
|
|
if (mimesniff.essence(mimeType) !== essence) {
|
|
|
|
charset = null;
|
2021-07-06 05:32:59 -04:00
|
|
|
const newCharset = MapPrototypeGet(mimeType.parameters, "charset");
|
2021-04-20 08:47:22 -04:00
|
|
|
if (newCharset !== undefined) {
|
|
|
|
charset = newCharset;
|
|
|
|
}
|
|
|
|
essence = mimesniff.essence(mimeType);
|
|
|
|
} else {
|
2021-07-06 05:32:59 -04:00
|
|
|
if (
|
|
|
|
MapPrototypeHas(mimeType.parameters, "charset") === null &&
|
|
|
|
charset !== null
|
|
|
|
) {
|
|
|
|
MapPrototypeSet(mimeType.parameters, "charset", charset);
|
2021-04-20 08:47:22 -04:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
if (mimeType === null) return null;
|
|
|
|
return mimeType;
|
|
|
|
}
|
|
|
|
get [_body]() {
|
|
|
|
return this[_response].body;
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @returns {Response}
|
|
|
|
*/
|
|
|
|
static error() {
|
|
|
|
const inner = newInnerResponse(0);
|
|
|
|
inner.type = "error";
|
|
|
|
const response = webidl.createBranded(Response);
|
|
|
|
response[_response] = inner;
|
|
|
|
response[_headers] = headersFromHeaderList(
|
|
|
|
response[_response].headerList,
|
|
|
|
"immutable",
|
|
|
|
);
|
|
|
|
return response;
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @param {string} url
|
|
|
|
* @param {number} status
|
|
|
|
* @returns {Response}
|
|
|
|
*/
|
|
|
|
static redirect(url, status = 302) {
|
|
|
|
const prefix = "Failed to call 'Response.redirect'";
|
|
|
|
url = webidl.converters["USVString"](url, {
|
|
|
|
prefix,
|
|
|
|
context: "Argument 1",
|
|
|
|
});
|
|
|
|
status = webidl.converters["unsigned short"](status, {
|
|
|
|
prefix,
|
|
|
|
context: "Argument 2",
|
|
|
|
});
|
|
|
|
|
|
|
|
const baseURL = getLocationHref();
|
|
|
|
const parsedURL = new URL(url, baseURL);
|
|
|
|
if (!redirectStatus(status)) {
|
|
|
|
throw new RangeError("Invalid redirect status code.");
|
|
|
|
}
|
|
|
|
const inner = newInnerResponse(status);
|
|
|
|
inner.type = "default";
|
2021-11-22 19:23:11 -05:00
|
|
|
ArrayPrototypePush(inner.headerList, ["Location", parsedURL.href]);
|
2021-04-20 08:47:22 -04:00
|
|
|
const response = webidl.createBranded(Response);
|
|
|
|
response[_response] = inner;
|
|
|
|
response[_headers] = headersFromHeaderList(
|
|
|
|
response[_response].headerList,
|
|
|
|
"immutable",
|
|
|
|
);
|
|
|
|
return response;
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
2021-04-28 10:08:51 -04:00
|
|
|
* @param {BodyInit | null} body
|
|
|
|
* @param {ResponseInit} init
|
2021-04-20 08:47:22 -04:00
|
|
|
*/
|
|
|
|
constructor(body = null, init = {}) {
|
|
|
|
const prefix = "Failed to construct 'Response'";
|
2021-09-25 09:30:31 -04:00
|
|
|
body = webidl.converters["BodyInit_DOMString?"](body, {
|
2021-04-20 08:47:22 -04:00
|
|
|
prefix,
|
|
|
|
context: "Argument 1",
|
|
|
|
});
|
2021-10-11 17:43:52 -04:00
|
|
|
init = webidl.converters["ResponseInit_fast"](init, {
|
2021-04-20 08:47:22 -04:00
|
|
|
prefix,
|
|
|
|
context: "Argument 2",
|
|
|
|
});
|
|
|
|
|
|
|
|
if (init.status < 200 || init.status > 599) {
|
|
|
|
throw new RangeError(
|
|
|
|
`The status provided (${init.status}) is outside the range [200, 599].`,
|
|
|
|
);
|
|
|
|
}
|
|
|
|
|
2021-10-11 17:43:52 -04:00
|
|
|
if (
|
|
|
|
init.statusText &&
|
|
|
|
!RegExpPrototypeTest(REASON_PHRASE_RE, init.statusText)
|
|
|
|
) {
|
2021-04-20 08:47:22 -04:00
|
|
|
throw new TypeError("Status text is not valid.");
|
|
|
|
}
|
|
|
|
|
|
|
|
this[webidl.brand] = webidl.brand;
|
|
|
|
const response = newInnerResponse(init.status, init.statusText);
|
2021-09-27 04:51:32 -04:00
|
|
|
/** @type {InnerResponse} */
|
2021-04-20 08:47:22 -04:00
|
|
|
this[_response] = response;
|
2021-09-27 04:51:32 -04:00
|
|
|
/** @type {Headers} */
|
2021-04-20 08:47:22 -04:00
|
|
|
this[_headers] = headersFromHeaderList(response.headerList, "response");
|
2021-10-11 17:43:52 -04:00
|
|
|
if (init.headers) {
|
2021-04-20 08:47:22 -04:00
|
|
|
fillHeaders(this[_headers], init.headers);
|
|
|
|
}
|
|
|
|
if (body !== null) {
|
|
|
|
if (nullBodyStatus(response.status)) {
|
|
|
|
throw new TypeError(
|
|
|
|
"Response with null body status cannot have body",
|
|
|
|
);
|
|
|
|
}
|
|
|
|
const res = extractBody(body);
|
|
|
|
response.body = res.body;
|
|
|
|
if (res.contentType !== null && !this[_headers].has("content-type")) {
|
|
|
|
this[_headers].append("Content-Type", res.contentType);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @returns {"basic" | "cors" | "default" | "error" | "opaque" | "opaqueredirect"}
|
|
|
|
*/
|
|
|
|
get type() {
|
2022-02-01 12:06:11 -05:00
|
|
|
webidl.assertBranded(this, ResponsePrototype);
|
2021-04-20 08:47:22 -04:00
|
|
|
return this[_response].type;
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @returns {string}
|
|
|
|
*/
|
|
|
|
get url() {
|
2022-02-01 12:06:11 -05:00
|
|
|
webidl.assertBranded(this, ResponsePrototype);
|
2021-04-20 08:47:22 -04:00
|
|
|
const url = this[_response].url();
|
|
|
|
if (url === null) return "";
|
|
|
|
const newUrl = new URL(url);
|
|
|
|
newUrl.hash = "";
|
|
|
|
return newUrl.href;
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @returns {boolean}
|
|
|
|
*/
|
|
|
|
get redirected() {
|
2022-02-01 12:06:11 -05:00
|
|
|
webidl.assertBranded(this, ResponsePrototype);
|
2021-04-20 08:47:22 -04:00
|
|
|
return this[_response].urlList.length > 1;
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @returns {number}
|
|
|
|
*/
|
|
|
|
get status() {
|
2022-02-01 12:06:11 -05:00
|
|
|
webidl.assertBranded(this, ResponsePrototype);
|
2021-04-20 08:47:22 -04:00
|
|
|
return this[_response].status;
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @returns {boolean}
|
|
|
|
*/
|
|
|
|
get ok() {
|
2022-02-01 12:06:11 -05:00
|
|
|
webidl.assertBranded(this, ResponsePrototype);
|
2021-04-20 08:47:22 -04:00
|
|
|
const status = this[_response].status;
|
|
|
|
return status >= 200 && status <= 299;
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @returns {string}
|
|
|
|
*/
|
|
|
|
get statusText() {
|
2022-02-01 12:06:11 -05:00
|
|
|
webidl.assertBranded(this, ResponsePrototype);
|
2021-04-20 08:47:22 -04:00
|
|
|
return this[_response].statusMessage;
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @returns {Headers}
|
|
|
|
*/
|
|
|
|
get headers() {
|
2022-02-01 12:06:11 -05:00
|
|
|
webidl.assertBranded(this, ResponsePrototype);
|
2021-04-20 08:47:22 -04:00
|
|
|
return this[_headers];
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @returns {Response}
|
|
|
|
*/
|
|
|
|
clone() {
|
2022-02-01 12:06:11 -05:00
|
|
|
webidl.assertBranded(this, ResponsePrototype);
|
2021-04-20 08:47:22 -04:00
|
|
|
if (this[_body] && this[_body].unusable()) {
|
|
|
|
throw new TypeError("Body is unusable.");
|
|
|
|
}
|
|
|
|
const second = webidl.createBranded(Response);
|
|
|
|
const newRes = cloneInnerResponse(this[_response]);
|
|
|
|
second[_response] = newRes;
|
|
|
|
second[_headers] = headersFromHeaderList(
|
|
|
|
newRes.headerList,
|
|
|
|
guardFromHeaders(this[_headers]),
|
|
|
|
);
|
|
|
|
return second;
|
|
|
|
}
|
|
|
|
|
2021-07-06 05:32:59 -04:00
|
|
|
[SymbolFor("Deno.customInspect")](inspect) {
|
2021-07-08 09:43:36 -04:00
|
|
|
return inspect(consoleInternal.createFilteredInspectProxy({
|
|
|
|
object: this,
|
2022-02-01 12:06:11 -05:00
|
|
|
evaluate: ObjectPrototypeIsPrototypeOf(ResponsePrototype, this),
|
2021-07-08 09:43:36 -04:00
|
|
|
keys: [
|
|
|
|
"body",
|
|
|
|
"bodyUsed",
|
|
|
|
"headers",
|
|
|
|
"ok",
|
|
|
|
"redirected",
|
|
|
|
"status",
|
|
|
|
"statusText",
|
|
|
|
"url",
|
|
|
|
],
|
|
|
|
}));
|
2021-04-20 08:47:22 -04:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2021-06-07 04:04:10 -04:00
|
|
|
webidl.configurePrototype(Response);
|
2022-02-01 12:06:11 -05:00
|
|
|
const ResponsePrototype = Response.prototype;
|
|
|
|
mixinBody(ResponsePrototype, _body, _mimeType);
|
2021-05-26 17:44:42 -04:00
|
|
|
|
2021-04-20 08:47:22 -04:00
|
|
|
webidl.converters["Response"] = webidl.createInterfaceConverter(
|
|
|
|
"Response",
|
2022-02-01 12:06:11 -05:00
|
|
|
ResponsePrototype,
|
2021-04-20 08:47:22 -04:00
|
|
|
);
|
|
|
|
webidl.converters["ResponseInit"] = webidl.createDictionaryConverter(
|
|
|
|
"ResponseInit",
|
|
|
|
[{
|
|
|
|
key: "status",
|
|
|
|
defaultValue: 200,
|
|
|
|
converter: webidl.converters["unsigned short"],
|
|
|
|
}, {
|
|
|
|
key: "statusText",
|
|
|
|
defaultValue: "",
|
|
|
|
converter: webidl.converters["ByteString"],
|
|
|
|
}, {
|
|
|
|
key: "headers",
|
|
|
|
converter: webidl.converters["HeadersInit"],
|
|
|
|
}],
|
|
|
|
);
|
2021-10-11 17:43:52 -04:00
|
|
|
webidl.converters["ResponseInit_fast"] = function (init, opts) {
|
|
|
|
if (init === undefined || init === null) {
|
|
|
|
return { status: 200, statusText: "", headers: undefined };
|
|
|
|
}
|
|
|
|
// Fast path, if not a proxy
|
|
|
|
if (typeof init === "object" && !isProxy(init)) {
|
|
|
|
// Not a proxy fast path
|
|
|
|
const status = init.status !== undefined
|
|
|
|
? webidl.converters["unsigned short"](init.status)
|
|
|
|
: 200;
|
|
|
|
const statusText = init.statusText !== undefined
|
|
|
|
? webidl.converters["ByteString"](init.statusText)
|
|
|
|
: "";
|
|
|
|
const headers = init.headers !== undefined
|
|
|
|
? webidl.converters["HeadersInit"](init.headers)
|
|
|
|
: undefined;
|
|
|
|
return { status, statusText, headers };
|
|
|
|
}
|
|
|
|
// Slow default path
|
|
|
|
return webidl.converters["ResponseInit"](init, opts);
|
|
|
|
};
|
2021-04-20 08:47:22 -04:00
|
|
|
|
|
|
|
/**
|
|
|
|
* @param {Response} response
|
|
|
|
* @returns {InnerResponse}
|
|
|
|
*/
|
|
|
|
function toInnerResponse(response) {
|
|
|
|
return response[_response];
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @param {InnerResponse} inner
|
|
|
|
* @param {"request" | "immutable" | "request-no-cors" | "response" | "none"} guard
|
|
|
|
* @returns {Response}
|
|
|
|
*/
|
|
|
|
function fromInnerResponse(inner, guard) {
|
|
|
|
const response = webidl.createBranded(Response);
|
|
|
|
response[_response] = inner;
|
|
|
|
response[_headers] = headersFromHeaderList(inner.headerList, guard);
|
|
|
|
return response;
|
|
|
|
}
|
|
|
|
|
|
|
|
window.__bootstrap.fetch ??= {};
|
|
|
|
window.__bootstrap.fetch.Response = Response;
|
2022-02-01 12:06:11 -05:00
|
|
|
window.__bootstrap.fetch.ResponsePrototype = ResponsePrototype;
|
2021-07-08 07:33:01 -04:00
|
|
|
window.__bootstrap.fetch.newInnerResponse = newInnerResponse;
|
2021-04-20 08:47:22 -04:00
|
|
|
window.__bootstrap.fetch.toInnerResponse = toInnerResponse;
|
|
|
|
window.__bootstrap.fetch.fromInnerResponse = fromInnerResponse;
|
|
|
|
window.__bootstrap.fetch.redirectStatus = redirectStatus;
|
|
|
|
window.__bootstrap.fetch.nullBodyStatus = nullBodyStatus;
|
|
|
|
window.__bootstrap.fetch.networkError = networkError;
|
2021-06-06 09:37:17 -04:00
|
|
|
window.__bootstrap.fetch.abortedNetworkError = abortedNetworkError;
|
2021-04-20 08:47:22 -04:00
|
|
|
})(globalThis);
|