Kong / unirest-java

Unirest in Java: Simplified, lightweight HTTP client library.
http://kong.github.io/unirest-java/
MIT License
2.6k stars 592 forks source link

Cloud graal native support be considered? #315

Closed Jamlee closed 4 years ago

Jamlee commented 4 years ago

Is your feature request related to a problem? Please describe. no Describe the solution you'd like use unirest in cli application and publish as native image.

Describe alternatives you've considered apache hc

Additional context no

whom use graal native: tocmat https://tomcat.apache.org/tomcat-9.0-doc/graal.html

micronaut https://micronaut.io/

quarkus https://quarkus.io

ryber commented 4 years ago

Tomcat, Micronaut and Quarkus are all application stacks. That is, they are containers for running an application. Most likely Unirest would be included in one of these stacks and compiled natively as a dependent library.

It's not clear to me what Unirest as a library that is not executable self would need to do? It looks like any application should be able to include Unirest itself in order to create a native image.

Jamlee commented 4 years ago

yeah, for example: unirest + picoli

ryber commented 4 years ago

So you want a CLI interface for Unirest? That would be a pretty major undertaking. We have a big backlog of functionality that would be ahead of such a thing (http2 for example). If you have a command line available, I don't see why you wouldn't use cURL. anything we made for unirest would eventually just look a lot like cURL and would probably never catch it in terms of features.

Jamlee commented 4 years ago

i plan to use unirest and picoli to build a cli tool for my web product, and build it to native image for publishing to customer. security and no depend to jre.

ryber commented 4 years ago

well, you sure could do that, and it would be great to see that open sourced, I'm not sure it belongs in this project by itself, possibly as a extension module, but I suspect you have a far smaller use case than "all of unirest". If there is anything about Unirest which is incompatible with graalvm let us know