mirror of
https://github.com/angular/angular
synced 2026-05-24 09:28:37 +00:00
Previously, opaque responses where handled a little differently than other responses from the mock server. More specifically, they were not tracked (so no assertions could be made for them) and their [`Body` mixin][1] methods (such as `arrayBuffer()`, `json()`, `text()`) would throw an error due to `body` being `null`. This commit ensures opaque responses are also captured on the mock server and also changes `Body` mixin methods to better simulate the [spec'd behavior][2]. (These improvements will be necessary to test caching of opaque responses in a subsequent commit.) [1]: https://developer.mozilla.org/en-US/docs/Web/API/Body [2]: https://fetch.spec.whatwg.org/#concept-body-consume-body PR Close #30977 |
||
|---|---|---|
| .. | ||
| BUILD.bazel | ||
| cache.ts | ||
| fetch.ts | ||
| mock.ts | ||
| scope.ts | ||