typhoeus:Typhoeus包装libcurl以便快速且可靠地发出请求

时间:2021-04-12 22:24:58
【文件属性】:
文件名称:typhoeus:Typhoeus包装libcurl以便快速且可靠地发出请求
文件大小:88KB
文件格式:ZIP
更新时间:2021-04-12 22:24:58
Ruby 伤寒 与带有100个蛇头的神话野兽的现代代码版本一样,Typhoeus并行运行HTTP请求,同时干净地封装了处理逻辑。 例子 单个请求: Typhoeus . get ( "www.example.com" , followlocation : true ) 并行请求: hydra = Typhoeus :: Hydra . new 10 . times . map { hydra . queue ( Typhoeus :: Request . new ( "www.example.com" , followlocation : true ) ) } hydra . run 安装 将以下行添加到您的Gemfile中: gem "typhoeus" 然后运行bundle install 或将其自己安装为: gem install typhoeus 项目追踪 (GitHub主)

网友评论