Skip to content

Commit

Permalink
Updated dist files.
Browse files Browse the repository at this point in the history
  • Loading branch information
ricmoo committed Apr 18, 2020
1 parent 560adea commit db604aa
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 9 deletions.
14 changes: 10 additions & 4 deletions packages/web/lib.esm/geturl.js
Original file line number Diff line number Diff line change
Expand Up @@ -53,19 +53,25 @@ export function getUrl(href, options) {
if (options == null) {
options = {};
}
// @TODO: Once we drop support for node 8, we can pass the href
// firectly into request and skip adding the components
// to this request object
const url = new URL(href);
const request = {
protocol: url.protocol,
hostname: url.hostname,
port: url.port,
path: (url.pathname + url.search),
method: (options.method || "GET"),
headers: (options.headers || {}),
};
let req = null;
switch (url.protocol) {
case "http:": {
req = http.request(url, request);
case "http:":
req = http.request(request);
break;
}
case "https:":
req = https.request(url, request);
req = https.request(request);
break;
default:
logger.throwError(`unsupported protocol ${url.protocol}`, Logger.errors.UNSUPPORTED_OPERATION, {
Expand Down
11 changes: 7 additions & 4 deletions packages/web/lib/geturl.js
Original file line number Diff line number Diff line change
Expand Up @@ -90,17 +90,20 @@ function getUrl(href, options) {
}
url = new url_1.URL(href);
request = {
protocol: url.protocol,
hostname: url.hostname,
port: url.port,
path: (url.pathname + url.search),
method: (options.method || "GET"),
headers: (options.headers || {}),
};
req = null;
switch (url.protocol) {
case "http:": {
req = http_1.default.request(url, request);
case "http:":
req = http_1.default.request(request);
break;
}
case "https:":
req = https_1.default.request(url, request);
req = https_1.default.request(request);
break;
default:
logger.throwError("unsupported protocol " + url.protocol, logger_1.Logger.errors.UNSUPPORTED_OPERATION, {
Expand Down
2 changes: 1 addition & 1 deletion packages/web/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
},
"tarballHash": "0x650d63a4fb9545025d67d16a3cf2f0dc41d0ccbf0bd90b095c119700de80144f",
"tarballHash": "0x61705e91a9250f3d5b7cbf031c2aff7c41be3557228d156de9b27bed652ac282",
"types": "./lib/index.d.ts",
"version": "5.0.0-beta.137"
}

0 comments on commit db604aa

Please sign in to comment.