You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@commons.apache.org by Stephen Charles Huey <st...@fastmail.fm> on 2003/08/12 00:44:04 UTC

httpclient: download file with url

I've finally figured out how to interact with an HTTPS site, but now that
a page is displaying for me a list of URLs pointing to files I can
download, how do I actually download a file?  Do I use Commons code, or
java.net (e.g. something to do with URL) and java.io (your
run-of-the-mill FileInputStream, etc) code, or some sort of combination,
or what?  For instance, can the pathname used to instantiate a
java.io.File object be a hyperlink on an HTTPS site?  Thanks for any
help!  

Re: httpclient: download file with url

Posted by Stephen Charles Huey <st...@fastmail.fm>.
This seems like a really dumb question all of a sudden.  I wracked my
brain so much over trying to interact with the HTTPS site (I got my code
working with an HTTP site days ago) that I've forgotten some of the
basics.  I'm assuming I use GET in some way, but really, I'm not sure how
to write it so that I actually download and save the file.  I'm using the
Commons HttpClient to interact with the site, and I'm guessing that
there's probably a really straightforward way to execute a GET and save
the file, so please help me out if you know...


On Mon, 11 Aug 2003 16:44:04 -0600, "Stephen Charles Huey"
<st...@fastmail.fm> said:
> I've finally figured out how to interact with an HTTPS site, but now that
> a page is displaying for me a list of URLs pointing to files I can
> download, how do I actually download a file?  Do I use Commons code, or
> java.net (e.g. something to do with URL) and java.io (your
> run-of-the-mill FileInputStream, etc) code, or some sort of combination,
> or what?  For instance, can the pathname used to instantiate a
> java.io.File object be a hyperlink on an HTTPS site?  Thanks for any
> help!  
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: commons-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: commons-user-help@jakarta.apache.org
>