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
Some time ago we chatted how we could make it possible to pass request options to fetch.send(). I actually forgot about the issue until I hopped back on my toy project this weekend and got stuck 😆 Opening a GH issue this time to keep it visible.
The simplest solution would be to introduce a FetchOptions type that we would pass to a new dedicated function like fetch.send_with_options(request, options).
Another path would be having a new FetchRequest type that wraps the classic gleam/http/request.{Request} with additional fetch-specific fields, such as mode, credentials, etc. We could then provide a builder pipeline to take the request, add options, and send it.
The text was updated successfully, but these errors were encountered:
I think the builder implementation seems most optimal in terms of future-compatibility. If you agree, I can prepare a little PR so we can focus on how to name things 😉
Some time ago we chatted how we could make it possible to pass request options to
fetch.send()
. I actually forgot about the issue until I hopped back on my toy project this weekend and got stuck 😆 Opening a GH issue this time to keep it visible.Here's the related discord discussion. We didn't reach any conclusion but it should help jog our memory.
The simplest solution would be to introduce a
FetchOptions
type that we would pass to a new dedicated function likefetch.send_with_options(request, options)
.Another path would be having a new
FetchRequest
type that wraps the classicgleam/http/request.{Request}
with additional fetch-specific fields, such asmode
,credentials
, etc. We could then provide a builder pipeline to take the request, add options, and send it.The text was updated successfully, but these errors were encountered: