- From: Kenton Varda <notifications@github.com>
- Date: Wed, 19 Jul 2023 13:28:57 -0700
- To: whatwg/fetch <fetch@noreply.github.com>
- Cc: Subscribed <subscribed@noreply.github.com>
Received on Wednesday, 19 July 2023 20:29:03 UTC
Maybe when calling the constructor, you specify a callback for `trailers`, which is invoked after the stream is done, and returns the trailer map at that point: ``` const response = new Response('I am a body', { headers: { 'Trailer': 'animal' }, trailers: () => { return { animal: animal } } }); ``` On the receiving end, invoking `response.trailers()` before reading the entire body is an error. -- Reply to this email directly or view it on GitHub: https://github.com/whatwg/fetch/issues/981#issuecomment-1642710542 You are receiving this because you are subscribed to this thread. Message ID: <whatwg/fetch/issues/981/1642710542@github.com>
Received on Wednesday, 19 July 2023 20:29:03 UTC