Rewrite AppDomain to handle uncaughts & promises
This commit is contained in:
+2
-2
@@ -57,7 +57,7 @@ class HttpRequest extends EventEmitter
|
||||
{
|
||||
this.Method = "POST";
|
||||
this.Headers[ "Content-Type" ] = "application/x-www-form-urlencoded";
|
||||
this.RawPostData = Data == undefined ? new Buffer([]) : new Buffer( Data );
|
||||
this.RawPostData = Data == undefined ? Buffer.alloc( 0 ) : Buffer.from( Data );
|
||||
this.Headers[ "Content-Length" ] = this.RawPostData.length;
|
||||
}
|
||||
|
||||
@@ -88,7 +88,7 @@ class HttpRequest extends EventEmitter
|
||||
|
||||
OnResponseReceived( Response )
|
||||
{
|
||||
var ResponseData = new Buffer( 0 );
|
||||
var ResponseData = Buffer.alloc( 0 );
|
||||
|
||||
Response.addListener( "data",
|
||||
Data => ResponseData = Buffer.concat([ ResponseData, Data ])
|
||||
|
||||
Reference in New Issue
Block a user