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

Please add an ability to use Alova.js instead Axios for Orion.makeHttpClientUsing(...) #35

Open
TempleOfTemplar opened this issue Apr 28, 2023 · 0 comments
Labels
enhancement New feature or request

Comments

@TempleOfTemplar
Copy link

Please add an ability to use Alova.js instead Axios for Orion.makeHttpClientUsing(...)

Something like that:
makeHttpClientUsing(callback: () => AxiosInstance | Alova): Orion;

Orion.makeHttpClientUsing(() => {
    // 1. Create an alova instance
    const alovaInstance = createAlova({
        // ReactHook is used to create ref status, including request status loading, response data data, request error object error, etc.
        statesHook: ReactHook,

        // request adapter, it is recommended to use the fetch request adapter
        requestAdapter: GlobalFetch()
    });

    return alovaInstance;
});
@alexzarbn alexzarbn added the enhancement New feature or request label Aug 21, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants