typed-rest-client
Advanced tools
Comparing version 1.0.1 to 1.0.2
{ | ||
"name": "typed-rest-client", | ||
"version": "1.0.1", | ||
"version": "1.0.2", | ||
"description": "Node Rest and Http Clients for use with TypeScript", | ||
@@ -9,3 +9,4 @@ "main": "./RestClient.js", | ||
"test": "node make.js test", | ||
"samples": "node make.js samples" | ||
"samples": "node make.js samples", | ||
"validate": "node make.js validate" | ||
}, | ||
@@ -12,0 +13,0 @@ "repository": { |
@@ -15,2 +15,5 @@ "use strict"; | ||
} | ||
if (!resource) { | ||
return baseUrl; | ||
} | ||
let base = url.parse(baseUrl); | ||
@@ -22,4 +25,3 @@ // resource (specific per request) eliments take priority | ||
resultantUrl.host = resultantUrl.host || base.host; | ||
let basePathComponent = base.pathname === '/' ? '' : base.pathname; | ||
resultantUrl.pathname = path.posix.resolve(basePathComponent, resultantUrl.pathname); | ||
resultantUrl.pathname = path.posix.resolve(base.pathname, resultantUrl.pathname); | ||
let res = url.format(resultantUrl); | ||
@@ -26,0 +28,0 @@ return res; |
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
63980
1327