-
-
Notifications
You must be signed in to change notification settings - Fork 76
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
export axios instance #254
Comments
Hey there, support for overriding the axios adapter is available in |
@tharropoulos I can confirm this version doesn't work in Cloudflare Pages for me. I'm getting this error locally and in production:
server config:
Typesense version: I would much prefer an approach like the SWR NPM package where I can specify the fetcher function I want to use. This is incredibly important for Cloudflare Workers.
An example class I just whipped up quickly to get myself going so I can honor the contract you have in your project and quickly and easily delete my class and replace it with yours when/if you ever allow us to maintain a different fetch implementation. |
(From the link in the stack trace): To fix this, we've added a new getAdapter method that:
Could you give that a try and see if that address the issue?
In regards to the fetcher, in SWR's case, the fetcher is basically any function that contains the same shape of data as the first arg passed into the hook, and returns a promise of said data. It's a lot different than what happens in this client, as the underlying interfaces are using explicit functions for fetching the data. We would instead need to build adapters for each HTTP library to be used underneath. |
@isaacrowntree Did you get the time to check it out? |
Description
please exportthe axios so we can change the axio config i.e interceptor or change to use fetch
Steps to reproduce
Expected Behavior
Actual Behavior
Metadata
Typesense Version:
OS:
The text was updated successfully, but these errors were encountered: