mirror of
https://github.com/maxswa/osrs-json-hiscores.git
synced 2025-10-15 10:19:04 +00:00
1.0.1
This commit is contained in:
20
node_modules/superagent/lib/agent-base.js
generated
vendored
Normal file
20
node_modules/superagent/lib/agent-base.js
generated
vendored
Normal file
@@ -0,0 +1,20 @@
|
||||
function Agent() {
|
||||
this._defaults = [];
|
||||
}
|
||||
|
||||
["use", "on", "once", "set", "query", "type", "accept", "auth", "withCredentials", "sortQuery", "retry", "ok", "redirects",
|
||||
"timeout", "buffer", "serialize", "parse", "ca", "key", "pfx", "cert"].forEach(function(fn) {
|
||||
/** Default setting for all requests from this agent */
|
||||
Agent.prototype[fn] = function(/*varargs*/) {
|
||||
this._defaults.push({fn:fn, arguments:arguments});
|
||||
return this;
|
||||
}
|
||||
});
|
||||
|
||||
Agent.prototype._setDefaults = function(req) {
|
||||
this._defaults.forEach(function(def) {
|
||||
req[def.fn].apply(req, def.arguments);
|
||||
});
|
||||
};
|
||||
|
||||
module.exports = Agent;
|
||||
Reference in New Issue
Block a user