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 ) {
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();
});
}
}
};