Allow providing custom Request
and Response
#1563
Labels
enhancement
New feature or request
openapi-fetch
Relevant to the openapi-fetch library
PRs welcome
PRs are welcome to solve this issue!
stale
Description
I am using
openapi-fetch
in Node.js. As you probably know, the built-infetch
is provided by Undici project, which is still in development. Usually it's better to installundici
package separately and have a warranty that fetching works the same, no matter the runtime version. Also, if you want to use more sophisticated features (like mocking or proxy connection), they're not available in the built-in version.When I tried to use Undici in your app, it broke down due to some inconsistency of
Request
object behavior (despite both implement the WHATWG spec). Here is a code snippet that shows the inconsistency.Results with:
Proposal
createClient
should allow providing customRequest
andResponse
constructors, next tofetch
.Checklist
The text was updated successfully, but these errors were encountered: