RawPostData should give default value
This commit is contained in:
parent
c75b49d935
commit
7b8348be37
@ -57,7 +57,7 @@ class HttpRequest extends EventEmitter
|
||||
{
|
||||
this.Method = "POST";
|
||||
this.Headers[ "Content-Type" ] = "application/x-www-form-urlencoded";
|
||||
this.RawPostData = new Buffer( Data );
|
||||
this.RawPostData = Data == undefined ? new Buffer([]) : new Buffer( Data );
|
||||
this.Headers[ "Content-Length" ] = this.RawPostData.length;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user