refactor(fetch/Request): inline defaultInnerRequest
Similar to
* @property {Blob | null} blobUrlEntry
*/
- const defaultInnerRequest = {
- url() {
- return this.urlList[0];
- },
- currentUrl() {
- return this.urlList[this.urlList.length - 1];
- },
- redirectMode: "follow",
- redirectCount: 0,
- clientRid: null,
- };
-
/**
* @param {string} method
* @param {string} url
blobUrlEntry = blobFromObjectUrl(url);
}
return {
- method: method,
+ method,
headerList,
body,
+ redirectMode: "follow",
+ redirectCount: 0,
urlList: [url],
+ clientRid: null,
blobUrlEntry,
- ...defaultInnerRequest,
+ url() {
+ return this.urlList[0];
+ },
+ currentUrl() {
+ return this.urlList[this.urlList.length - 1];
+ },
};
}
return {
method: request.method,
- url() {
- return this.urlList[0];
- },
- currentUrl() {
- return this.urlList[this.urlList.length - 1];
- },
headerList,
body,
redirectMode: request.redirectMode,
urlList: request.urlList,
clientRid: request.clientRid,
blobUrlEntry: request.blobUrlEntry,
+ url() {
+ return this.urlList[0];
+ },
+ currentUrl() {
+ return this.urlList[this.urlList.length - 1];
+ },
};
}
