- Notifications
You must be signed in to change notification settings - Fork445
Closed
Description
Hi,
A new method has been added:static Response.json(data, init)
to create a response that contains JSON (not to be confused withResponse.prototype.json()
).
declarevarResponse:{// ...json(data:any,init?:ResponseInit):Response;};
Support:
- ✔️ Chromium105
- ❌ Firefox:Implement
Response.json
static method /D171217 - ❌ Safari:Implement
Response.json
static method /[fetch] Implement theResponse.json
static method WebKit/WebKit#10593 - ✔️ Node viaUndici v5.3.0
- node-fetchv3.3.0
- ✔️ Deno1.22
- ✔️ Bun0.0.74
I found that in this project:
TypeScript-DOM-lib-generator/inputfiles/removedTypes.jsonc
Lines 83 to 95 in513aae2
"Response": { | |
"methods": { | |
"method": { | |
// BCD's api.Response.json is not about the static method but about Body#json. | |
// See: | |
// Firefox https://bugzil.la/1758943 | |
// Chrome https://crbug.com/1305358 | |
// Safari https://webkit.org/b/240375 | |
// MDN https://github.com/mdn/content/discussions/5121#discussioncomment-2735488 | |
"json":null | |
} | |
} | |
}, |
Metadata
Metadata
Assignees
Labels
No labels