default to 200 response status

This commit is contained in:
Rhys Evans 2016-07-13 00:28:36 +01:00 committed by GitHub
parent b46c5ea9ee
commit c3e05ff1f7
1 changed files with 1 additions and 1 deletions

View File

@ -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;