mirror of
https://github.com/angular/angular.git
synced 2026-11-23 07:05:14 -05:00
Keep the charset handling added in #70062 limited to text responses. JSON bytes must stay UTF-8 regardless of the Content-Type charset. Fetch defines Body.json() using "parse JSON from bytes". Infra specifies that step as: "Let string be the result of running UTF-8 decode on bytes." https://fetch.spec.whatwg.org/#dom-body-json https://infra.spec.whatwg.org/#parse-json-bytes-to-a-javascript-value