From c3e05ff1f75577b9eb19a7cd3171ea163b4d9f8f Mon Sep 17 00:00:00 2001 From: Rhys Evans Date: Wed, 13 Jul 2016 00:28:36 +0100 Subject: [PATCH] default to 200 response status --- lib/response.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/response.js b/lib/response.js index 99d1184..f96aa85 100644 --- a/lib/response.js +++ b/lib/response.js @@ -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;