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

Function initializeResponse

github-actions/saucelabs/set-saucelabs-env.js:12945–12975  ·  view source on GitHub ↗
(response, init, body)

Source from the content-addressed store, hash-verified

12943 return new Proxy(response, {
12944 get(target, p) {
12945 return p in state ? state[p] : target[p];
12946 },
12947 set(target, p, value) {
12948 assert(!(p in state));
12949 target[p] = value;
12950 return true;
12951 }
12952 });
12953 }
12954 function filterResponse(response, type) {
12955 if (type === "basic") {
12956 return makeFilteredResponse(response, {
12957 type: "basic",
12958 headersList: response.headersList
12959 });
12960 } else if (type === "cors") {
12961 return makeFilteredResponse(response, {
12962 type: "cors",
12963 headersList: response.headersList
12964 });
12965 } else if (type === "opaque") {
12966 return makeFilteredResponse(response, {
12967 type: "opaque",
12968 urlList: Object.freeze([]),
12969 status: 0,
12970 statusText: "",
12971 body: null
12972 });
12973 } else if (type === "opaqueredirect") {
12974 return makeFilteredResponse(response, {
12975 type: "opaqueredirect",
12976 status: 0,
12977 statusText: "",
12978 headersList: [],

Callers 2

jsonMethod · 0.70
constructorMethod · 0.70

Calls 4

isValidReasonPhraseFunction · 0.70
fillFunction · 0.70
containsMethod · 0.45
appendMethod · 0.45

Tested by

no test coverage detected