Skip to content

Add method static Response.json(data, init) #1444

Closed
@regseb

Description

@regseb

Hi,

A new method has been added: static Response.json(data, init) to create a response that contains JSON (not to be confused with Response.prototype.json()).

declare var Response: {
    // ...
    json(data: any, init?: ResponseInit): Response;
};

Support:


I found that in this project:

"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

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions