We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent a989787 commit fdd3810Copy full SHA for fdd3810
index.js
@@ -7,9 +7,9 @@ http.request = function (params, cb) {
7
if (!params.host && !params.port) {
8
params.port = parseInt(window.location.port, 10);
9
}
10
+ if (!params.scheme) params.scheme = window.location.protocol.split(':')[0];
11
if (!params.host) params.host = window.location.hostname;
12
if (!params.port) params.port = params.scheme == 'https' ? 443 : 80;
- if (!params.scheme) params.scheme = window.location.protocol.split(':')[0];
13
14
var req = new Request(new xhrHttp, params);
15
if (cb) req.on('response', cb);
0 commit comments