You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Add Fetch, Headers, Request, and Response APIs #69882
@skrustev A note on one design point for this family.
The design for objects that the caller creates, such as new Request(...) and new Headers(...), is not settled yet in this package. Two things are open.
Whether the API should be a factory like Request.CreateAsync(...).
How the caller disposes the created object. One option returns a wrapper type that holds the object in .Value (like UrlSearchParamsOwner). The other returns a derived type that adds IAsyncDisposable (like OwnedUrlSearchParams : UrlSearchParams).
Both are under discussion in the "URL and URLSearchParams API proposal" ([API Proposal] Add URL and URLSearchParams browser platform APIs #69924). I suggest watching that discussion and following its result. The porting skill does not cover this point yet. It only says these objects are "not designed yet".
@skrustev Please also take a look at the event listener API proposal (#69922). It is mainly about events, but it also proposes to leave forEach out of the package, and Headers has forEach if I'm not mistaken. Any review or feedback on #69922 itself is welcome, too.
@skrustev One more note, just for your information. As far as I know, there is no design or guideline yet for how to handle the AbortController behind the signal of fetch() from .NET.
The porting skill only says to add a CancellationToken where Web IDL has an AbortSignal. It does not say how that token should actually abort the request in the browser.
@skrustev FYI, I filed a design issue about how a CancellationToken reaches the browser as an AbortSignal (#70044), with a prototype in #70045.
It affects how FetchAsync can cancel a request, and who owns the AbortController after fetch() returns, which shapes Response. I wanted you to see it early.
No action is needed from you now. I just did not want it to be a surprise later.
@jsakamotoIGJP I already had been working on how it would looks like in the context of the Fetch request. I'll refer to your document then and it can be compared to it
Activity
jsakamotoIGJP commentedon Oct 21, 2026
@skrustev A note on one design point for this family.
The design for objects that the caller creates, such as
new Request(...)andnew Headers(...), is not settled yet in this package. Two things are open.Whether the API should be a factory like
Request.CreateAsync(...).How the caller disposes the created object. One option returns a wrapper type that holds the object in
.Value(likeUrlSearchParamsOwner). The other returns a derived type that addsIAsyncDisposable(likeOwnedUrlSearchParams : UrlSearchParams).Both are under discussion in the "URL and URLSearchParams API proposal" ([API Proposal] Add URL and URLSearchParams browser platform APIs #69924). I suggest watching that discussion and following its result. The porting skill does not cover this point yet. It only says these objects are "not designed yet".
jsakamotoIGJP commentedon Oct 21, 2026
@skrustev Please also take a look at the event listener API proposal (#69922). It is mainly about events, but it also proposes to leave
forEachout of the package, andHeadershasforEachif I'm not mistaken. Any review or feedback on #69922 itself is welcome, too.jsakamotoIGJP commentedon Oct 21, 2026
@skrustev One more note, just for your information. As far as I know, there is no design or guideline yet for how to handle the
AbortControllerbehind the signal offetch()from .NET.The porting skill only says to add a CancellationToken where Web IDL has an AbortSignal. It does not say how that token should actually abort the request in the browser.
jsakamotoIGJP commentedon Oct 26, 2026
@skrustev FYI, I filed a design issue about how a
CancellationTokenreaches the browser as anAbortSignal(#70044), with a prototype in #70045.It affects how
FetchAsynccan cancel a request, and who owns theAbortControllerafterfetch()returns, which shapesResponse. I wanted you to see it early.No action is needed from you now. I just did not want it to be a surprise later.
skrustev commentedon Oct 26, 2026
@jsakamotoIGJP I already had been working on how it would looks like in the context of the Fetch request. I'll refer to your document then and it can be compared to it