Comparing version 1.0.1 to 1.0.2
@@ -50,5 +50,5 @@ var Util = require('util'); | ||
} | ||
if(expired) { | ||
newToken = linkhub.newToken(this.ServiceID,CorpNum,this._getScopes(),null); | ||
newToken = linkhub.newToken(this.ServiceID,CorpNum,this._getScopes(),null); | ||
this._Linkhub_Token_Cash[CorpNum] = newToken; | ||
@@ -145,3 +145,3 @@ } | ||
requestOpt, | ||
function(response){ | ||
function(response){ | ||
if(options.success) options.success(response); | ||
@@ -185,3 +185,3 @@ }, | ||
}); | ||
} | ||
@@ -206,9 +206,15 @@ else { | ||
function(response) { | ||
var res = ''; | ||
var buf = new Buffer(0); | ||
response.on('data',function(chunk) { | ||
res += chunk; | ||
buf = Buffer.concat([buf,chunk]); | ||
}); | ||
response.on('end',function(){ | ||
if(this.statusCode == '200') success(JSON.parse(res)); | ||
else if(error) error(JSON.parse(res)); | ||
if(this.statusCode == '200'){ | ||
success(JSON.parse(buf)); | ||
} | ||
else if(error) { | ||
error(JSON.parse(buf)); | ||
} | ||
}); | ||
@@ -230,3 +236,3 @@ } | ||
BaseService.prototype._throwError = function(Code,Message,err) { | ||
if(err) | ||
if(err) | ||
err({code : Code , message : Message}); | ||
@@ -233,0 +239,0 @@ else if (typeof this._config.defaultErrorHandler === 'function') |
{ | ||
"name": "popbill", | ||
"version": "1.0.1", | ||
"version": "1.0.2", | ||
"description": "Popbill API SDK for node. see www.popbill.com", | ||
@@ -5,0 +5,0 @@ "author": "Kim Seongjun <pallet027@gmail.com>", |
# node-popbill | ||
팝빌 node.js SDK v1.0.1 | ||
팝빌 node.js SDK v1.0.2 | ||
@@ -4,0 +4,0 @@ ## Install |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
146384
3380