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

Method clone

github-actions/browserstack/set-browserstack-env.js:13555–13578  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

13553 `'${request.method} is unsupported in no-cors mode.`
13554 );
13555 }
13556 setHeadersGuard(this[kHeaders], "request-no-cors");
13557 }
13558 if (initHasKey) {
13559 const headersList = getHeadersList(this[kHeaders]);
13560 const headers = init.headers !== void 0 ? init.headers : new HeadersList(headersList);
13561 headersList.clear();
13562 if (headers instanceof HeadersList) {
13563 for (const { name, value } of headers.rawValues()) {
13564 headersList.append(name, value, false);
13565 }
13566 headersList.cookies = headers.cookies;
13567 } else {
13568 fillHeaders(this[kHeaders], headers);
13569 }
13570 }
13571 const inputBody = input instanceof _Request ? input[kState].body : null;
13572 if ((init.body != null || inputBody != null) && (request.method === "GET" || request.method === "HEAD")) {
13573 throw new TypeError("Request with GET/HEAD method cannot have body.");
13574 }
13575 let initBody = null;
13576 if (init.body != null) {
13577 const [extractedBody, contentType] = extractBody(
13578 init.body,
13579 request.keepalive
13580 );
13581 initBody = extractedBody;

Callers 1

""Function · 0.45

Calls 8

bodyUnusableFunction · 0.70
cloneRequestFunction · 0.70
buildAbortFunction · 0.70
fromInnerRequestFunction · 0.70
abortMethod · 0.45
getMethod · 0.45
setMethod · 0.45
addMethod · 0.45

Tested by

no test coverage detected