Why does Gradle do not offer a builtin http client...
# community-support
p
Why does Gradle do not offer a builtin http client/dsl/abstraction to upload files? Of course you can easily add a dependency to the http client library you want to use, but Gradle already uses Apache http client under the hood and downloading/uploading files is common use-case when integrate the build with other systems, like uploading test results.
a
Yeah, it would be convenient to have something built-in, so that the buildscript classpath could be kept cleaner. There are a couple of utils for downloading files: TextResource and Ant Get https://stackoverflow.com/questions/35050610/can-a-gradle-copy-task-be-used-to-copy-a-file-from-a-url/69823963#69823963 Java 11 has
<http://java.net|java.net>.http.HttpClient
, which could be used for uploading?