简体   繁体   中英

How to call javascript function making a axios api call from java

I have a javascript function which make a.network call using the axios library. The function supports for GET and POST. My requirement is to call the same javascript function from Java, which internally will make a.network call using axios.

You can create a node.js application that uses the axios library to accomplish what you need and call it from Java with code similar to this:

Runtime run  = Runtime.getRuntime();
run.exec(command);

That said, Java has excellent libraries for.networking to probably fit your requirement.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM