diff options
Diffstat (limited to 'extensions/fetch/23_response.js')
-rw-r--r-- | extensions/fetch/23_response.js | 26 |
1 files changed, 15 insertions, 11 deletions
diff --git a/extensions/fetch/23_response.js b/extensions/fetch/23_response.js index 11eb13570..0db20e90e 100644 --- a/extensions/fetch/23_response.js +++ b/extensions/fetch/23_response.js @@ -13,6 +13,7 @@ ((window) => { const webidl = window.__bootstrap.webidl; + const consoleInternal = window.__bootstrap.console; const { HTTP_TAB_OR_SPACE, regexMatcher } = window.__bootstrap.infra; const { extractBody, mixinBody } = window.__bootstrap.fetchBody; const { getLocationHref } = window.__bootstrap.location; @@ -377,17 +378,20 @@ } [SymbolFor("Deno.customInspect")](inspect) { - const inner = { - body: this.body, - bodyUsed: this.bodyUsed, - headers: this.headers, - ok: this.ok, - redirected: this.redirected, - status: this.status, - statusText: this.statusText, - url: this.url, - }; - return `Response ${inspect(inner)}`; + return inspect(consoleInternal.createFilteredInspectProxy({ + object: this, + evaluate: this instanceof Response, + keys: [ + "body", + "bodyUsed", + "headers", + "ok", + "redirected", + "status", + "statusText", + "url", + ], + })); } } |