-
Notifications
You must be signed in to change notification settings - Fork 1.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[fetch] Implement the Response.json
static method
#10593
[fetch] Implement the Response.json
static method
#10593
Conversation
This PR depends on #10087. |
EWS run on previous version of this PR (hash c0fcbca)
|
c0fcbca
to
5a5f252
Compare
EWS run on previous version of this PR (hash 5a5f252)
|
5a5f252
to
7be7abb
Compare
EWS run on previous version of this PR (hash 7be7abb)
|
7be7abb
to
c3b304e
Compare
EWS run on previous version of this PR (hash c3b304e)
|
@youennf PTAL |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks ok to me.
A few potential improvements below.
c3b304e
to
89f0f0a
Compare
EWS run on previous version of this PR (hash 89f0f0a)
|
89f0f0a
to
5fcd50d
Compare
EWS run on current version of this PR (hash 5fcd50d) |
@youennf Could you merge this PR? |
https://bugs.webkit.org/show_bug.cgi?id=240375 Reviewed by Youenn Fablet. This implements the `Response.json` static method, added to the fetch spec in whatwg/fetch#1392. * LayoutTests/imported/w3c/web-platform-tests/fetch/api/response/response-static-json.any-expected.txt: * LayoutTests/imported/w3c/web-platform-tests/fetch/api/response/response-static-json.any.serviceworker-expected.txt: * LayoutTests/imported/w3c/web-platform-tests/fetch/api/response/response-static-json.any.sharedworker-expected.txt: * LayoutTests/imported/w3c/web-platform-tests/fetch/api/response/response-static-json.any.worker-expected.txt: * Source/WebCore/Modules/fetch/FetchBody.h: * Source/WebCore/Modules/fetch/FetchResponse.cpp: (WebCore::FetchResponse::create): Added this method overload to implement the spec's "initialize a response" algorithm. This algortihm used to be combined with the regular Response creation algorithm which extracts the body, but Response.json cannot use that directly. (WebCore::FetchResponse::staticJson): * Source/WebCore/Modules/fetch/FetchResponse.h: * Source/WebCore/Modules/fetch/FetchResponse.idl: Canonical link: https://commits.webkit.org/261960@main
5fcd50d
to
206817f
Compare
Committed 261960@main (206817f): https://commits.webkit.org/261960@main Reviewed commits have been landed. Closing PR #10593 and removing active labels. |
206817f
5fcd50d