MCPcopy Create free account
hub / github.com/angular/dev-infra / makeResponse

Function makeResponse

github-actions/browserstack/set-browserstack-env.js:12863–12878  ·  view source on GitHub ↗
(init)

Source from the content-addressed store, hash-verified

12861 if (bodyUnusable(this)) {
12862 throw webidl.errors.exception({
12863 header: "Response.clone",
12864 message: "Body has already been consumed."
12865 });
12866 }
12867 const clonedResponse = cloneResponse(this[kState]);
12868 if (hasFinalizationRegistry && ((_a = this[kState].body) == null ? void 0 : _a.stream)) {
12869 streamRegistry.register(this, new WeakRef(this[kState].body.stream));
12870 }
12871 return fromInnerResponse(clonedResponse, getHeadersGuard(this[kHeaders]));
12872 }
12873 [nodeUtil.inspect.custom](depth, options) {
12874 var _a;
12875 if (options.depth === null) {
12876 options.depth = 2;
12877 }
12878 (_a = options.colors) != null ? _a : options.colors = true;
12879 const properties = {
12880 status: this.status,
12881 statusText: this.statusText,

Callers 7

jsonMethod · 0.70
redirectMethod · 0.70
constructorMethod · 0.70
cloneResponseFunction · 0.70
makeNetworkErrorFunction · 0.70
schemeFetchFunction · 0.70
httpNetworkFetchFunction · 0.70

Calls 2

__spreadPropsFunction · 0.70
__spreadValuesFunction · 0.70

Tested by

no test coverage detected