eh-api-client
Advanced tools
Comparing version 0.45.0 to 0.45.1
@@ -85,5 +85,7 @@ var | ||
else if(data instanceof Array) { | ||
url = data.shift(); | ||
// no modification to the input URL should be made, so we clone the variable | ||
data = data.slice() | ||
url = data.shift() | ||
url = url.replace(/\?\?/g, function() { | ||
return encodeURIComponent(data.shift()); | ||
return encodeURIComponent(data.shift()) | ||
}); | ||
@@ -90,0 +92,0 @@ } |
{ | ||
"name": "eh-api-client", | ||
"version": "0.45.0", | ||
"version": "0.45.1", | ||
"description": "Node.js rest client", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
@@ -25,2 +25,13 @@ var | ||
}); | ||
it("should not modify incoming URL when using placeholders", function(done) { | ||
const url = ["/ws/??/??", "item", "id"] | ||
const origUrl = url.slice() | ||
client.get(url, { | ||
test: true | ||
}, function(err, req) { | ||
should.not.exists(err); | ||
url.should.eql(origUrl) | ||
done(); | ||
}); | ||
}); | ||
}); |
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
87379
2141