-
Notifications
You must be signed in to change notification settings - Fork 10.1k
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
[api-minor] Use the Fetch API, when supported, to load PDF documents in Node.js environments #17706
Conversation
/botio test |
From: Bot.io (Linux m4)ReceivedCommand cmd_test from @Snuffleupagus received. Current queue size: 0 Live output at: http://54.241.84.105:8877/b56126603fddbe1/output.txt |
From: Bot.io (Windows)ReceivedCommand cmd_test from @Snuffleupagus received. Current queue size: 0 Live output at: http://54.193.163.58:8877/2b9e009f677d77f/output.txt |
Given that in Lines 74 to 76 in 72b8b29
fetch is not supported?
|
Yes, according to the Node.js documentation it can still be manually disabled in even the latest version; see https://nodejs.org/docs/latest-v21.x/api/cli.html#--no-experimental-fetch |
From: Bot.io (Linux m4)FailedFull output at http://54.241.84.105:8877/b56126603fddbe1/output.txt Total script time: 24.86 mins
Image differences available at: http://54.241.84.105:8877/b56126603fddbe1/reftest-analyzer.html#web=eq.log |
From: Bot.io (Windows)FailedFull output at http://54.193.163.58:8877/2b9e009f677d77f/output.txt Total script time: 39.06 mins
Image differences available at: http://54.193.163.58:8877/2b9e009f677d77f/reftest-analyzer.html#web=eq.log |
…in Node.js environments Given that modern Node.js versions now implement support for a fair number of "browser" APIs, we can utilize the standard Fetch API to load PDF documents that are specified via http/https URLs. Please find compatibility information at: - https://developer.mozilla.org/en-US/docs/Web/API/Fetch_API#browser_compatibility - https://nodejs.org/dist/latest-v18.x/docs/api/globals.html#fetch - https://developer.mozilla.org/en-US/docs/Web/API/Response#browser_compatibility - https://nodejs.org/dist/latest-v18.x/docs/api/globals.html#response
1ccd1f7
to
eded037
Compare
/botio unittest |
From: Bot.io (Windows)ReceivedCommand cmd_unittest from @Snuffleupagus received. Current queue size: 0 Live output at: http://54.193.163.58:8877/9ea7f5765b6fa01/output.txt |
From: Bot.io (Linux m4)ReceivedCommand cmd_unittest from @Snuffleupagus received. Current queue size: 0 Live output at: http://54.241.84.105:8877/b93f2cfe74533c4/output.txt |
From: Bot.io (Linux m4)SuccessFull output at http://54.241.84.105:8877/b93f2cfe74533c4/output.txt Total script time: 2.35 mins
|
From: Bot.io (Windows)SuccessFull output at http://54.193.163.58:8877/9ea7f5765b6fa01/output.txt Total script time: 10.25 mins
|
@calixteman Gentle review ping here, and for #17691. (Normally I'd ask Tim to review these sort of patches, but he's unfortunately not been around for awhile.) |
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.
LGTM. Thank you.
Yes, I have been quite busy the last weeks and also had some days off, but I'm back again :-) This also looks really good to me; thanks for doing this! |
Given that modern Node.js versions now implement support for a fair number of "browser" APIs, we can utilize the standard Fetch API to load PDF documents that are specified via http/https URLs.
Please find compatibility information at: