node-rest-client
Advanced tools
Comparing version 0.0.3 to 0.0.4
@@ -198,4 +198,4 @@ var http = require('http'), | ||
var ConnectManager = { | ||
"xmlctype":["application/xml"], | ||
"jsonctype":["application/json"], | ||
"xmlctype":["application/xml","application/xml;charset=utf-8"], | ||
"jsonctype":["application/json","application/json;charset=utf-8"], | ||
"isXML":function(content){ | ||
@@ -290,2 +290,5 @@ var result = false; | ||
debug("typeof data es ", typeof data); | ||
debug("content-type es", content); | ||
// XML data need to be parsed as JS object | ||
@@ -296,4 +299,3 @@ if (self.isXML(content)){ | ||
}); | ||
}else if (self.isJSON(content)){ | ||
debug("typeof data es ", typeof data); | ||
}else if (self.isJSON(content)){ | ||
callback(JSON.parse(data), res); | ||
@@ -300,0 +302,0 @@ }else{ |
@@ -5,3 +5,3 @@ { | ||
"description": "node API REST client", | ||
"version": "0.0.3", | ||
"version": "0.0.4", | ||
"repository": { | ||
@@ -8,0 +8,0 @@ "type":"git", |
23088
10
437