default to 200 response status
This commit is contained in:
parent
b46c5ea9ee
commit
c3e05ff1f7
|
@ -23,7 +23,7 @@ function Response(body, opts) {
|
|||
opts = opts || {};
|
||||
|
||||
this.url = opts.url;
|
||||
this.status = opts.status;
|
||||
this.status = opts.status || 200;
|
||||
this.statusText = opts.statusText || http.STATUS_CODES[this.status];
|
||||
this.headers = new Headers(opts.headers);
|
||||
this.ok = this.status >= 200 && this.status < 300;
|
||||
|
|
Loading…
Reference in New Issue