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 message: "Expected an http/s scheme when method is not GET"
16030 });
16031 }
16032 const innerResponse = response[kState];
16033 if (innerResponse.status === 206) {
16034 throw webidl.errors.exception({
16035 header: prefix,
16036 message: "Got 206 status"
16037 });
16038 }
16039 if (innerResponse.headersList.contains("vary")) {
16040 const fieldValues = getFieldValues(innerResponse.headersList.get("vary"));
16041 for (const fieldValue of fieldValues) {
16042 if (fieldValue === "*") {
16043 throw webidl.errors.exception({
16044 header: prefix,
16045 message: "Got * vary field value"
16046 });
16047 }
16048 }
16049 }
16050 if (innerResponse.body && (isDisturbed(innerResponse.body.stream) || innerResponse.body.stream.locked)) {
16051 throw webidl.errors.exception({
16052 header: prefix,
16053 message: "Response body is locked or disturbed"
16054 });
16055 }
16056 const clonedResponse = cloneResponse(innerResponse);
16057 const bodyReadPromise = createDeferredPromise();
16058 if (innerResponse.body != null) {
16059 const stream = innerResponse.body.stream;
16060 const reader = stream.getReader();
16061 readAllBytes(reader).then(bodyReadPromise.resolve, bodyReadPromise.reject);
16062 } else {
16063 bodyReadPromise.resolve(void 0);
16064 }
16065 const operations = [];
16066 const operation = {
16067 type: "put",
16068 // 14.
16069 request: innerRequest,
16070 // 15.
16071 response: clonedResponse
16072 // 16.
16073 };
16074 operations.push(operation);
16075 const bytes = yield bodyReadPromise.promise;

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