unjs / ofetch

😱 A better fetch API. Works on node, browser and workers.
MIT License
4.15k stars 128 forks source link

Provide localAddress option? #445

Closed luke358 closed 1 month ago

luke358 commented 1 month ago

Describe the feature

We need to be able to bind outgoing HTTP requests to particular network interfaces.

ofetch doesn't currently expose the localAddress option when creating an http request, which would allow us to accomplish our need.

Additional information

pi0 commented 1 month ago

Hi dear Luke. Unfortunately, it is not something within ofetch scope if fetch spec does not allow this.

Two places you might raise this requirement for fetch on servers: