MCPcopy
hub / github.com/vercel/next.js / clone

Method clone

packages/next/src/compiled/@edge-runtime/primitives/load.js:12005–12015  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

12003 }
12004 // Returns a clone of response.
12005 clone() {
12006 webidl.brandCheck(this, _Response);
12007 if (bodyUnusable(this)) {
12008 throw webidl.errors.exception({
12009 header: "Response.clone",
12010 message: "Body has already been consumed."
12011 });
12012 }
12013 const clonedResponse = cloneResponse(this[kState]);
12014 return fromInnerResponse2(clonedResponse, getHeadersGuard(this[kHeaders]));
12015 }
12016 [nodeUtil.inspect.custom](depth, options) {
12017 if (options.depth === null) {
12018 options.depth = 2;

Callers 10

constructorMethod · 0.45
index.jsFile · 0.45
endMethod · 0.45
otFunction · 0.45
IcFunction · 0.45
EeFunction · 0.45
FIFunction · 0.45
eAFunction · 0.45
index.node.jsFile · 0.45

Calls 3

bodyUnusableFunction · 0.70
cloneResponseFunction · 0.70
fromInnerResponse2Function · 0.70

Tested by

no test coverage detected