HttpStatusChecker
Easily Checking http status with Multi-threaded
Features
- Get http status
- A threaded (fast) per host name
- Return redirect url and errors when get http access
Installation
Add this line to your application's Gemfile:
gem 'http_status_checker'
And then execute:
$ bundle
Or install it yourself as:
$ gem install http_status_checker
Usage on Command Line
$ http_status_checker -u http://morizyun.github.io
#=> url: http://morizyun.github.io
#=> response: {:code=>"200", :is_alive=>true, :redirect_url=>nil}
Usage on Ruby Program
require 'http_status_checker'
urls = ['http://morizyun.github.io', 'http://www.yahoo.co.jp']
interval_sec = 1
HttpStatusChecker.check urls, interval_sec
#=> [{"http://morizyun.github.io"=>{:code=>"200", :is_alive=>true, :redirect_url=>nil}},
#=> {"http://www.yahoo.co.jp"=>{:code=>"200", :is_alive=>true, :redirect_url=>nil}}]
Contributing
- Fork it ( https://github.com/morizyun/http_status_checker/fork )
- Create your feature branch (
git checkout -b my-new-feature
) - Commit your changes (
git commit -am 'Add some feature'
) - Push to the branch (
git push origin my-new-feature
) - Create a new Pull Request