formacao
This commit is contained in:
+11
@@ -176,6 +176,17 @@ var requestPrototype = {
|
||||
}
|
||||
});
|
||||
});
|
||||
Object.defineProperty(requestPrototype, Symbol.for("nodejs.util.inspect.custom"), {
|
||||
value: function(depth, options, inspectFn) {
|
||||
const props = {
|
||||
method: this.method,
|
||||
url: this.url,
|
||||
headers: this.headers,
|
||||
nativeRequest: this[requestCache]
|
||||
};
|
||||
return `Request (lightweight) ${inspectFn(props, { ...options, depth: depth == null ? null : depth - 1 })}`;
|
||||
}
|
||||
});
|
||||
Object.setPrototypeOf(requestPrototype, Request.prototype);
|
||||
var newRequest = (incoming, defaultHostname) => {
|
||||
const req = Object.create(requestPrototype);
|
||||
|
||||
Reference in New Issue
Block a user