sdkman / sdkman-java-sdk

An sdk for the Groovy enVironment Manager (GVM)
Apache License 2.0
24 stars 11 forks source link

Add a download method #7

Open noamt opened 10 years ago

noamt commented 10 years ago

In order for me to use the SDK client for the SGVM project, I also need net.gvmtool.client.GvmClient to provide a method that downloads a candidate distribution.

I was going to create a pull request for this, but I've noticed that the groovy-wslite client automatically loads the response data to memory; Grails distributions may reach ~100MB, so I'm not so sure it's a good idea.

Thoughts?

pledbrook commented 10 years ago

If you have a URL representing a binary download, why not just use the standard URL class? That's what Lazybones does.

noamt commented 10 years ago

Thanks, that's a good idea. If I'm not mistaken, the GVM service redirects the request to the real download URL, so handling it might get a little ugly, but it's a start.

noamt commented 10 years ago

OK, redirection is actually handled well; I'll open a pull request.