Skip to content

Use fetch in URLResolver#2873

Merged
liborm85 merged 1 commit intobpampuch:masterfrom
gulshan:use-fetch
Aug 4, 2025
Merged

Use fetch in URLResolver#2873
liborm85 merged 1 commit intobpampuch:masterfrom
gulshan:use-fetch

Conversation

@gulshan
Copy link
Copy Markdown
Contributor

@gulshan gulshan commented Jul 5, 2025

This PR streamlines the URLResolver class by migrating from Node.js http/https modules to the fetch API. This change eliminates the need for a separate URLBrowserResolver (which used XHR) as fetch is natively supported in modern browsers.

This PR:

  • Replaces Node.js http/https module usages by the fetch API.
  • Removes the browser-specific implementation URLBrowserResolver.
  • Relies on fetch's default behavior for handling redirects.

This update is compatible with PDFMake's minimum supported browser versions and Node.js v18+.

@gulshan
Copy link
Copy Markdown
Contributor Author

gulshan commented Jul 5, 2025

Should the changes in the build directory be committed?

@gulshan gulshan marked this pull request as ready for review July 9, 2025 15:20
@liborm85 liborm85 merged commit b6248a6 into bpampuch:master Aug 4, 2025
9 checks passed
@liborm85
Copy link
Copy Markdown
Collaborator

liborm85 commented Aug 4, 2025

Merged. Thanks.

@gulshan gulshan deleted the use-fetch branch August 4, 2025 16:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants