MCPcopy Index your code
hub / github.com/nodejs/node / cloneResponse

Function cloneResponse

deps/undici/undici.js:12215–12227  ·  view source on GitHub ↗
(response)

Source from the content-addressed store, hash-verified

12213 error: kEnumerableProperty
12214 });
12215 function cloneResponse(response) {
12216 if (response.internalResponse) {
12217 return filterResponse(
12218 cloneResponse(response.internalResponse),
12219 response.type
12220 );
12221 }
12222 const newResponse = makeResponse({ ...response, body: null });
12223 if (response.body != null) {
12224 newResponse.body = cloneBody(response.body);
12225 }
12226 return newResponse;
12227 }
12228 __name(cloneResponse, "cloneResponse");
12229 function makeResponse(init) {
12230 return {

Callers 1

cloneMethod · 0.70

Calls 3

filterResponseFunction · 0.70
makeResponseFunction · 0.70
cloneBodyFunction · 0.70

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…