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

I use axios in js, but throw error #13

Open
s949492225 opened this issue Oct 13, 2021 · 1 comment
Open

I use axios in js, but throw error #13

s949492225 opened this issue Oct 13, 2021 · 1 comment

Comments

@s949492225
Copy link

I use axios in js, but throw error
is this not support axios?

@seven332
Copy link
Owner

No.
Axios requires http API in Node.js, or XMLHttpRequests in a browser. But QuickJS is only a js interpreter. No dom, no Node.js API.

It's still possible to make http requests. You can call any java code in js like this.
https://github.com/seven332/quickjs-android/blob/wrapper/library/src/androidTest/java/com/hippo/quickjs/android/JSFunctionCallbackTest.java#L14

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

2 participants