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

πŸ› Bug Report β€” Runtime APIs "application/dns-json" not detected as text body #3326

Open
zecanard opened this issue Jan 13, 2025 · 0 comments

Comments

@zecanard
Copy link

zecanard commented Jan 13, 2025

I am trying to using the API to query the Cloudflare DNS, but it returns a MIME type of application/dns-json, which throws the warning:

Called .text() on an HTTP body which does not appear to be text. The body's Content-Type is "application/dns-json". The result will probably be corrupted. Consider checking the Content-Type header before interpreting entities as text.

Looking at:

(subtype == "json" || subtype.endsWith("+json"));
Should the line be changed to simply subtype.includes("json")? Not sure of possible implications vs endsWith(), as previously suggested.

This is a continuation of #528. Apologies if I should have commented on that one instead of opening a new Issue.

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

1 participant