Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Default to using the scheme of the current page

  • Loading branch information...
commit e4a5316f34de17334df90bc5f20dc654c5fcc636 1 parent f2ba2df
@ForbesLindesay ForbesLindesay authored
Showing with 1 addition and 0 deletions.
  1. +1 −0  index.js
View
1  index.js
@@ -6,6 +6,7 @@ http.request = function (params, cb) {
if (!params) params = {};
if (!params.host) params.host = window.location.host.split(':')[0];
if (!params.port) params.port = window.location.port;
+ if (!params.scheme) params.scheme = window.location.protocol.split(':')[0];
var req = new Request(new xhrHttp, params);
if (cb) req.on('response', cb);
Please sign in to comment.
Something went wrong with that request. Please try again.