How do I download a file over HTTP using Ruby?

后端 未结 5 1009
南笙
南笙 2021-02-07 04:12

How do I download a file over HTTP using Ruby?

5条回答
  •  北海茫月
    2021-02-07 04:39

    There are several ways, but the easiest is probably OpenURI. This blog post has some sample code, and also goes over Net::HTTP (with Hpricot) and Rio.

提交回复
热议问题