Skip to content
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

Allow passing in AxiosRequestConfig adapter #11

Open
fresheneesz opened this issue Dec 21, 2022 · 0 comments
Open

Allow passing in AxiosRequestConfig adapter #11

fresheneesz opened this issue Dec 21, 2022 · 0 comments

Comments

@fresheneesz
Copy link

Right now lnbits can't be used in a cloudflare worker, because cloudflare workers can only use fetch to interact. We can use @vespaiach/axios-fetch-adapter if only we could pass it in. It looks like all the primary source files should be updated to allow passing in the adapter, or probably more general axios config overrides.

My current workaround is to monkey patch the adapter in. Eg:

const { withdraw } = LNBits.default({ ... });
withdraw.api.defaults.adapter = fetchAdapter;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant