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

Method delete

github-actions/browserstack/set-browserstack-env.js:16031–16072  ·  view source on GitHub ↗
(_0)

Source from the content-addressed store, hash-verified

16029 types: ["undefined is not allowed"]
16030 });
16031 }
16032 request = webidl.converters.RequestInfo(request);
16033 if (typeof request === "string") {
16034 continue;
16035 }
16036 const r = request[kState];
16037 if (!urlIsHttpHttpsScheme(r.url) || r.method !== "GET") {
16038 throw webidl.errors.exception({
16039 header: prefix,
16040 message: "Expected http/s scheme when method is not GET."
16041 });
16042 }
16043 }
16044 const fetchControllers = [];
16045 for (const request of requests) {
16046 const r = new Request(request)[kState];
16047 if (!urlIsHttpHttpsScheme(r.url)) {
16048 throw webidl.errors.exception({
16049 header: prefix,
16050 message: "Expected http/s scheme."
16051 });
16052 }
16053 r.initiator = "fetch";
16054 r.destination = "subresource";
16055 requestList.push(r);
16056 const responsePromise = createDeferredPromise();
16057 fetchControllers.push(fetching({
16058 request: r,
16059 processResponse(response) {
16060 if (response.type === "error" || response.status === 206 || response.status < 200 || response.status > 299) {
16061 responsePromise.reject(webidl.errors.exception({
16062 header: "Cache.addAll",
16063 message: "Received an invalid status code or the request failed."
16064 }));
16065 } else if (response.headersList.contains("vary")) {
16066 const fieldValues = getFieldValues(response.headersList.get("vary"));
16067 for (const fieldValue of fieldValues) {
16068 if (fieldValue === "*") {
16069 responsePromise.reject(webidl.errors.exception({
16070 header: "Cache.addAll",
16071 message: "invalid vary field value"
16072 }));
16073 for (const controller of fetchControllers) {
16074 controller.abort();
16075 }

Callers 10

constructorMethod · 0.45
setMethod · 0.45
[kClose]Method · 0.45
runLookupMethod · 0.45
deleteMethod · 0.45
deleteMethod · 0.45
abortFunction · 0.45
httpRedirectFetchFunction · 0.45
httpNetworkOrCacheFetchFunction · 0.45
deleteMethod · 0.45

Calls 4

__asyncFunction · 0.70
createDeferredPromiseFunction · 0.70
__privateMethodFunction · 0.70
pushMethod · 0.45

Tested by

no test coverage detected