diff --git a/model/WumpRequest.js b/model/WumpRequest.js index f43e6e1..e251245 100644 --- a/model/WumpRequest.js +++ b/model/WumpRequest.js @@ -29,7 +29,7 @@ module.exports = class WumpRequest { query ( a, b ) { if ( typeof a === 'object' ) Object.keys( a ).forEach( ( v ) => this.url.searchParams.append( v, a[ v ] ) ); - else this.url.searchParams.append( a, ab ) + else this.url.searchParams.append( a, b ); return this; } @@ -49,7 +49,7 @@ module.exports = class WumpRequest { } compress () { - this.compressed = true + this.compressed = true; if ( !this.rHeaders[ 'accept-encoding' ] ) this.rHeaders[ 'accept-encoding' ] = c.join( ', ' ); return this; @@ -97,10 +97,10 @@ module.exports = class WumpRequest { wumpRes = new WumpResponse( res ); stream.on( 'error', ( e ) => reject( e ) ); - stream.on( 'data', ( c ) => wumpRes._addChunk( c ) ) + stream.on( 'data', ( c ) => wumpRes._addChunk( c ) ); stream.on( 'end', () => resolve( wumpRes ) ); } - } + }; if ( this.url.protocol === 'http:' ) req = http.request( options, resHandler ); else if (this.url.protocol === 'https:') req = https.request( options, resHandler ); @@ -119,4 +119,4 @@ module.exports = class WumpRequest { req.end(); }); } -} +}; \ No newline at end of file diff --git a/package.json b/package.json index df00b64..78f2406 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "wumpfetch", - "version": "0.0.1", + "version": "0.0.2", "description": "🚀 A lightweight and fast Node.js HTTP Client", "author": "Wessel \"wesselgame\" T ", "license": "MIT",