- From: Anne van Kesteren <notifications@github.com>
- Date: Fri, 21 Jul 2023 09:04:17 -0700
- To: whatwg/fetch <fetch@noreply.github.com>
- Cc: Subscribed <subscribed@noreply.github.com>
Received on Friday, 21 July 2023 16:04:23 UTC
Thoughts: * Reading trailers: `Promise<Headers> trailers()` makes sense for both `Request` and `Response`. I don't think we should reject if you call it before consuming the body. However, I don't think it should actively consume the body either. That seems very bad. Is it impractical to make them available before the body is consumed? If so, I guess we need to require body consumption before it will start returning something useful. Except perhaps for synthetic requests/responses. * Setting trailers: `Promise<HeadersInit> trailers;` makes sense for both `Request` and `Response`. I don't think we should reject if you resolve the promise early. `Headers` is not an expensive object to keep around. * Caching: not sure. Perhaps cached entries never have trailers? -- Reply to this email directly or view it on GitHub: https://github.com/whatwg/fetch/issues/981#issuecomment-1645808136 You are receiving this because you are subscribed to this thread. Message ID: <whatwg/fetch/issues/981/1645808136@github.com>
Received on Friday, 21 July 2023 16:04:23 UTC