-
-
Notifications
You must be signed in to change notification settings - Fork 13
Description
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 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.