Minor bugfixes

This commit is contained in:
斟酌 鵬兄 2016-02-29 05:46:29 +08:00
parent 041b3fa508
commit 7ce7dec57c
2 changed files with 11 additions and 5 deletions

View File

@ -7,10 +7,16 @@ var https = require( "https" );
class HttpRequestCompleteEventArgs class HttpRequestCompleteEventArgs
{ {
constructor( statusCode, ResponseData ) constructor( Response, ResponseData )
{ {
this.statusCode = statusCode; this.statusCode = Response.statusCode;
this.Data = ResponseData; this.Data = ResponseData;
this.Response = Response;
}
get Headers()
{
return this.Response.headers;
} }
get ResponseString() get ResponseString()
@ -101,7 +107,7 @@ class HttpRequest extends EventEmitter
Response.addListener( "end", () => { Response.addListener( "end", () => {
_self.emit( "RequestComplete" _self.emit( "RequestComplete"
, this, new HttpRequestCompleteEventArgs( Response.statusCode, ResponseData ) , this, new HttpRequestCompleteEventArgs( Response, ResponseData )
); );
} ); } );
} }

View File

@ -28,9 +28,9 @@ class WebParam
toString() toString()
{ {
var paramStr = ""; var paramStr = "";
for( var i in param ) for( var i in this.param )
{ {
paramStr += i + "=" + param[i] + ";"; paramStr += i + "=" + this.param[i] + ";";
} }
return paramStr; return paramStr;
} }