We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent db4c81a commit 436406dCopy full SHA for 436406d
src/Response.js
@@ -2,14 +2,14 @@ import Body from "./Body";
2
import Headers from "./Headers";
3
4
class Response {
5
- constructor(bodyInit, options = {}) {
+ constructor(body, options = {}) {
6
this.type = "basic";
7
this.status = options.status ?? 200;
8
this.ok = this.status >= 200 && this.status < 300;
9
this.statusText = options.statusText ?? "";
10
this.headers = new Headers(options.headers);
11
this.url = options.url ?? "";
12
- this._body = new Body(bodyInit);
+ this._body = new Body(body);
13
14
if (!this.headers.has("content-type") && this._body._mimeType) {
15
this.headers.set("content-type", this._body._mimeType);
0 commit comments