-
-
Notifications
You must be signed in to change notification settings - Fork 369
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Can external "fetch dependency be injected to ky" #269
Comments
Would it be okay if it were just a normal Ky option, as below? const parsed = await ky.post('https://example.com', {fetch, json: {foo: true}}).json(); const myKy = ky.extend({fetch});
const parsed = await myKy.post('https://example.com', {json: {foo: true}}).json(); |
Yes, it is |
Isn't this a duplicate of #56? |
Yes, you're correct, it is. And the concerns that Sindre expressed there are still valid. However, it's worth noting that since then:
It's definitely worth reconsidering this. |
@sholladay |
It should be pretty easy. You would need to update this part of the code where we execute the fetch, so that it would be something like |
@guillaume-chervet @sholladay |
I would like to inject an enhanced fetch to ky (fetch is a dependency to ky).
In order to use with https://github.com/AxaGuilDEv/react-oidc/tree/master/packages/context-fetch in a "functionnal way"
Is it possible to do something like :
const parsed = await ky(fetch).post('https://example.com', {json: {foo: true}}).json();
?
Regards,
Guillaume
The text was updated successfully, but these errors were encountered: