Merge pull request #132 from wheresrhys/patch-1

default to 200 response status
This commit is contained in:
David Frank 2016-07-13 13:01:47 +08:00 committed by GitHub
commit 952aa2a135
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;