Skip to content

Allow passing in AxiosRequestConfig adapter #11

@fresheneesz

Description

@fresheneesz

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;

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions