Merge pull request #132 from wheresrhys/patch-1
default to 200 response status
This commit is contained in:
commit
952aa2a135
|
@ -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