-
-
Notifications
You must be signed in to change notification settings - Fork 112
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
4 changed files
with
43 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
//Based on follow-redirects v0.0.x | ||
|
||
var nativeHttps = require('https'), | ||
nativeHttp = require('http'), | ||
url = require('url'), | ||
util = require('./util'); | ||
|
||
var maxRedirects = module.exports.maxRedirects = 5; | ||
|
||
var protocols = { | ||
https: nativeHttps, | ||
http: nativeHttp | ||
}; | ||
|
||
for (var protocol in protocols) { | ||
var h = function() {}; | ||
h.prototype = protocols[protocol]; | ||
h = new h(); | ||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
// https://github.com/HenrikJoreteg/extend-object/blob/v0.1.0/extend-object.js | ||
|
||
var arr = []; | ||
var each = arr.forEach; | ||
var slice = arr.slice; | ||
|
||
module.exports.extend = function(obj) { | ||
each.call(slice.call(arguments, 1), function(source) { | ||
if (source) { | ||
for (var prop in source) { | ||
obj[prop] = source[prop]; | ||
} | ||
} | ||
}); | ||
return obj; | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters