Skip to content
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

Update Accept header for JSON modules with network imports #50116

Closed
nicolo-ribaudo opened this issue Oct 10, 2023 · 1 comment
Closed

Update Accept header for JSON modules with network imports #50116

nicolo-ribaudo opened this issue Oct 10, 2023 · 1 comment

Comments

@nicolo-ribaudo
Copy link
Contributor

The HTML spec is being updated to use the appropriate fetch destination for JSON modules: whatwg/html#9486, whatwg/fetch#1691

As far as I can tell, the only relevant different for Node.js is that now JSON modules are fetched with the Accept: application/json,*/*;q=0.5 HTTP header rather than Accept: */*. My knowledge of Node.js' HTTP imports implementation is limited, so please somebody else confirm this.

@nicolo-ribaudo nicolo-ribaudo changed the title Update Accept header for JSON modules with http imports Update Accept header for JSON modules with network imports Oct 10, 2023
@marco-ippolito
Copy link
Member

marco-ippolito commented Oct 10, 2023

I think it should not have any impact other than

headers: { Accept: '*/*' },
but I'll wait for more opinions

nodejs-github-bot pushed a commit that referenced this issue Oct 30, 2023
PR-URL: #50119
Refs: #50116
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: Jacob Smith <jacob@frende.me>
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
alexfernandez pushed a commit to alexfernandez/node that referenced this issue Nov 1, 2023
PR-URL: nodejs#50119
Refs: nodejs#50116
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: Jacob Smith <jacob@frende.me>
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
targos pushed a commit that referenced this issue Nov 11, 2023
PR-URL: #50119
Refs: #50116
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: Jacob Smith <jacob@frende.me>
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
targos pushed a commit that referenced this issue Nov 14, 2023
PR-URL: #50119
Refs: #50116
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: Jacob Smith <jacob@frende.me>
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
UlisesGascon pushed a commit that referenced this issue Dec 11, 2023
PR-URL: #50119
Refs: #50116
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: Jacob Smith <jacob@frende.me>
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
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

No branches or pull requests

2 participants