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

Function initializeResponse

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

Source from the content-addressed store, hash-verified

12943 get status() {
12944 webidl.brandCheck(this, _Response);
12945 return this[kState].status;
12946 }
12947 // Returns whether response’s status is an ok status.
12948 get ok() {
12949 webidl.brandCheck(this, _Response);
12950 return this[kState].status >= 200 && this[kState].status <= 299;
12951 }
12952 // Returns response’s status message.
12953 get statusText() {
12954 webidl.brandCheck(this, _Response);
12955 return this[kState].statusText;
12956 }
12957 // Returns response’s headers as Headers.
12958 get headers() {
12959 webidl.brandCheck(this, _Response);
12960 return this[kHeaders];
12961 }
12962 get body() {
12963 webidl.brandCheck(this, _Response);
12964 return this[kState].body ? this[kState].body.stream : null;
12965 }
12966 get bodyUsed() {
12967 webidl.brandCheck(this, _Response);
12968 return !!this[kState].body && util.isDisturbed(this[kState].body.stream);
12969 }
12970 // Returns a clone of response.
12971 clone() {
12972 var _a;
12973 webidl.brandCheck(this, _Response);
12974 if (bodyUnusable(this)) {
12975 throw webidl.errors.exception({
12976 header: "Response.clone",
12977 message: "Body has already been consumed."
12978 });

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