'use strict';constReadable=require('stream').Readable;constlowercaseKeys=require('lowercase-keys');classResponseextendsReadable{constructor(statusCode,headers,body,url){if(typeofstatusCode!=='number'){thrownewTypeError('Argument `statusCode` should be a number');}if(typeofheaders!=='object'){thrownewTypeError('Argument `headers` should be an object');}if(!(bodyinstanceofBuffer)){thrownewTypeError('Argument `body` should be a buffer');}if(typeofurl!=='string'){thrownewTypeError('Argument `url` should be a string');}super();this.statusCode=statusCode;this.headers=lowercaseKeys(headers);this.body=body;this.url=url;}_read(){this.push(this.body);this.push(null);}}module.exports=Response;