require \'net/http\'
urls = [
{\'link\' => \'http://www.google.com/\'},
{\'link\' => \'http://www.yandex.ru/\'},
{\'link\' => \'http://www.baidu.com/\'}
]
ur
This can be done with the C library cURL. A ruby binding for that library exists, but it doesn't seem to support this functionality out of the box. However, it looks like there is a patch adding/fixing it (example code is available on the page). I know this doesn't sound great, but it might be worth a try if there aren't any better suggestions.