Fix some small typo's

This commit is contained in:
Wessel Damian Tip
2019-01-15 14:57:12 +01:00
parent dc0260b330
commit b55a75c608
2 changed files with 6 additions and 6 deletions

View File

@@ -29,7 +29,7 @@ module.exports = class WumpRequest {
query ( a, b ) { query ( a, b ) {
if ( typeof a === 'object' ) Object.keys( a ).forEach( ( v ) => this.url.searchParams.append( v, a[ v ] ) ); 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; return this;
} }
@@ -49,7 +49,7 @@ module.exports = class WumpRequest {
} }
compress () { compress () {
this.compressed = true this.compressed = true;
if ( !this.rHeaders[ 'accept-encoding' ] ) this.rHeaders[ 'accept-encoding' ] = c.join( ', ' ); if ( !this.rHeaders[ 'accept-encoding' ] ) this.rHeaders[ 'accept-encoding' ] = c.join( ', ' );
return this; return this;
@@ -97,10 +97,10 @@ module.exports = class WumpRequest {
wumpRes = new WumpResponse( res ); wumpRes = new WumpResponse( res );
stream.on( 'error', ( e ) => reject( e ) ); 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 ) ); stream.on( 'end', () => resolve( wumpRes ) );
} }
} };
if ( this.url.protocol === 'http:' ) req = http.request( options, resHandler ); if ( this.url.protocol === 'http:' ) req = http.request( options, resHandler );
else if (this.url.protocol === 'https:') req = https.request( options, resHandler ); else if (this.url.protocol === 'https:') req = https.request( options, resHandler );
@@ -119,4 +119,4 @@ module.exports = class WumpRequest {
req.end(); req.end();
}); });
} }
} };

View File

@@ -1,6 +1,6 @@
{ {
"name": "wumpfetch", "name": "wumpfetch",
"version": "0.0.1", "version": "0.0.2",
"description": "🚀 A lightweight and fast Node.js HTTP Client", "description": "🚀 A lightweight and fast Node.js HTTP Client",
"author": "Wessel \"wesselgame\" T <discord@go2it.eu>", "author": "Wessel \"wesselgame\" T <discord@go2it.eu>",
"license": "MIT", "license": "MIT",