quickjs-android
quickjs-android copied to clipboard
I use axios in js, but throw error
I use axios in js, but throw error is this not support axios?
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