[whatwg/fetch] Flag for "Terminate on Response Body"? (Issue #1382)

`<a ping>` (Hyperlink auditing), `navigator.sendBeacon()`, and the `keepalive` flag (once the parent document has been unloaded) have a concept of terminating the request once the response body starts to be received as these are "fire and forget" requests and there is nowhere for a response to go. 

eg. in [Hyperlink auditing](https://html.spec.whatwg.org/commit-snapshots/0777f6ddda146ff7973b9fc1273d4c16ff92dc3b/#hyperlink-auditing):
> User agents must ignore any entity bodies returned in the responses. User agents may close the connection prematurely once they start receiving a response body.

Would it make sense to add a flag? 

related: https://github.com/whatwg/fetch/issues/679
----

Aside: I guess the wait is for the start of the body rather than the status to allow for any cookies, etc. to be set by the response?

-- 
Reply to this email directly or view it on GitHub:
https://github.com/whatwg/fetch/issues/1382
You are receiving this because you are subscribed to this thread.

Message ID: <whatwg/fetch/issues/1382@github.com>

Received on Saturday, 8 January 2022 13:32:14 UTC